net.dataforte.cassandra.pool.jmx
Class ConnectionPoolMBean
java.lang.Object
javax.management.NotificationBroadcasterSupport
net.dataforte.cassandra.pool.jmx.ConnectionPoolMBean
- All Implemented Interfaces:
- DynamicMBean, NotificationBroadcaster, NotificationEmitter
public class ConnectionPoolMBean
- extends NotificationBroadcasterSupport
- implements DynamicMBean
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
pool
protected ConnectionPool pool
- the connection pool
sequence
protected AtomicInteger sequence
- sequence for JMX notifications
listeners
protected ConcurrentLinkedQueue<NotificationListener> listeners
- Listeners that are local and interested in our notifications, no need for
JMX
NOTIFY_INIT
public static final String NOTIFY_INIT
- See Also:
- Constant Field Values
NOTIFY_CONNECT
public static final String NOTIFY_CONNECT
- See Also:
- Constant Field Values
NOTIFY_ABANDON
public static final String NOTIFY_ABANDON
- See Also:
- Constant Field Values
SUSPECT_ABANDONED_NOTIFICATION
public static final String SUSPECT_ABANDONED_NOTIFICATION
- See Also:
- Constant Field Values
ConnectionPoolMBean
public ConnectionPoolMBean(ConnectionPool pool)
getPool
public ConnectionPool getPool()
getPoolProperties
public PoolConfiguration getPoolProperties()
invoke
public Object invoke(String actionName,
Object[] params,
String[] signature)
throws MBeanException,
ReflectionException
- Specified by:
invoke in interface DynamicMBean
- Throws:
MBeanException
ReflectionException
getMBeanInfo
public MBeanInfo getMBeanInfo()
- Specified by:
getMBeanInfo in interface DynamicMBean
setAttribute
public void setAttribute(Attribute attribute)
throws AttributeNotFoundException,
InvalidAttributeValueException,
MBeanException
- Specified by:
setAttribute in interface DynamicMBean
- Throws:
AttributeNotFoundException
InvalidAttributeValueException
MBeanException
setAttributes
public AttributeList setAttributes(AttributeList attributes)
- Specified by:
setAttributes in interface DynamicMBean
getAttribute
public Object getAttribute(String attribute)
throws AttributeNotFoundException,
MBeanException
- Specified by:
getAttribute in interface DynamicMBean
- Throws:
AttributeNotFoundException
MBeanException
getAttributes
public AttributeList getAttributes(String[] attributes)
- Specified by:
getAttributes in interface DynamicMBean
getNotificationInfo
public MBeanNotificationInfo[] getNotificationInfo()
- Specified by:
getNotificationInfo in interface NotificationBroadcaster- Overrides:
getNotificationInfo in class NotificationBroadcasterSupport
getDefaultNotificationInfo
public static MBeanNotificationInfo[] getDefaultNotificationInfo()
notify
public boolean notify(String type,
String message)
- Return true if the notification was sent successfully, false otherwise.
- Parameters:
type - message -
- Returns:
- true if the notification succeeded
addListener
public void addListener(NotificationListener list)
removeListener
public boolean removeListener(NotificationListener list)
checkIdle
public void checkIdle()
checkAbandoned
public void checkAbandoned()
testIdle
public void testIdle()
Copyright © 2011. All Rights Reserved.