org.smallmind.quorum.pool.connection.jmx
Class ConnectionPoolMonitors

java.lang.Object
  extended by javax.management.StandardMBean
      extended by javax.management.StandardEmitterMBean
          extended by org.smallmind.quorum.pool.connection.jmx.ConnectionPoolMonitors
All Implemented Interfaces:
EventListener, DynamicMBean, MBeanRegistration, NotificationBroadcaster, NotificationEmitter, ConnectionPoolEventListener, ConnectionPoolMonitorsMBean

public class ConnectionPoolMonitors
extends StandardEmitterMBean
implements ConnectionPoolMonitorsMBean, ConnectionPoolEventListener


Constructor Summary
ConnectionPoolMonitors()
           
 
Method Summary
 long getAcquireWaitTimeMillis(String poolId)
           
 long getConnectionTimeoutMillis(String poolId)
           
 int getFreeSize(String poolId)
           
 int getInitialPoolSize(String poolId)
           
 int getMaxIdleTimeSeconds(String poolId)
           
 int getMaxLeaseTimeSeconds(String poolId)
           
 int getMaxPoolSize(String poolId)
           
 int getMinPoolSize(String poolId)
           
 String getPoolName(String poolId)
           
 int getPoolSize(String poolId)
           
 int getProcessingSize(String poolId)
           
 int getUnreturnedConnectionTimeoutSeconds(String poolId)
           
 boolean isExistentiallyAware(String poolId)
           
 boolean isReportLeaseTimeNanos(String poolId)
           
 boolean isTestOnAcquire(String poolId)
           
 boolean isTestOnConnect(String poolId)
           
 void postDeregister()
           
 void postRegister(Boolean success)
           
 void preDeregister()
           
 ObjectName preRegister(MBeanServer mBeanServer, ObjectName objectName)
           
 void registerConnectionPool(String poolId, RemoteConnectionPoolSurface remoteSurface)
           
 void removeConnectionPool(String poolId)
           
 void reportConnectionErrorOccurred(ErrorReportingConnectionPoolEvent event)
           
 void reportConnectionLeaseTime(LeaseTimeReportingConnectionPoolEvent event)
           
 void setAcquireWaitTimeMillis(String poolId, long acquireWaitTimeMillis)
           
 void setConnectionTimeoutMillis(String poolId, long connectionTimeoutMillis)
           
 void setExistentiallyAware(String poolId, boolean existentiallyAware)
           
 void setMaxIdleTimeSeconds(String poolId, int maxIdleTimeSeconds)
           
 void setMaxLeaseTimeSeconds(String poolId, int leaseTimeSeconds)
           
 void setMaxPoolSize(String poolId, int maxPoolSize)
           
 void setMinPoolSize(String poolId, int minPoolSize)
           
 void setReportLeaseTimeNanos(String poolId, boolean reportLeaseTimeNanos)
           
 void setTestOnAcquire(String poolId, boolean testOnAcquire)
           
 void setTestOnConnect(String poolId, boolean testOnConnect)
           
 void setUnreturnedConnectionTimeoutSeconds(String poolId, int unreturnedConnectionTimeoutSeconds)
           
 void shutdown(String poolId)
           
 void startup(String poolId)
           
 
Methods inherited from class javax.management.StandardEmitterMBean
addNotificationListener, getNotificationInfo, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class javax.management.StandardMBean
cacheMBeanInfo, getAttribute, getAttributes, getCachedMBeanInfo, getClassName, getConstructors, getDescription, getDescription, getDescription, getDescription, getDescription, getDescription, getDescription, getImpact, getImplementation, getImplementationClass, getMBeanInfo, getMBeanInterface, getParameterName, getParameterName, invoke, setAttribute, setAttributes, setImplementation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionPoolMonitors

public ConnectionPoolMonitors()
Method Detail

preRegister

public ObjectName preRegister(MBeanServer mBeanServer,
                              ObjectName objectName)
                       throws UnknownHostException,
                              NoSuchMethodException,
                              MalformedURLException,
                              RemoteException,
                              NamingException
Specified by:
preRegister in interface MBeanRegistration
Overrides:
preRegister in class StandardMBean
Throws:
UnknownHostException
NoSuchMethodException
MalformedURLException
RemoteException
NamingException

postRegister

public void postRegister(Boolean success)
Specified by:
postRegister in interface MBeanRegistration
Overrides:
postRegister in class StandardMBean

preDeregister

public void preDeregister()
                   throws MalformedURLException,
                          NotBoundException,
                          RemoteException
Specified by:
preDeregister in interface MBeanRegistration
Overrides:
preDeregister in class StandardMBean
Throws:
MalformedURLException
NotBoundException
RemoteException

postDeregister

public void postDeregister()
Specified by:
postDeregister in interface MBeanRegistration
Overrides:
postDeregister in class StandardMBean

reportConnectionErrorOccurred

public void reportConnectionErrorOccurred(ErrorReportingConnectionPoolEvent event)
Specified by:
reportConnectionErrorOccurred in interface ConnectionPoolEventListener

reportConnectionLeaseTime

public void reportConnectionLeaseTime(LeaseTimeReportingConnectionPoolEvent event)
Specified by:
reportConnectionLeaseTime in interface ConnectionPoolEventListener

registerConnectionPool

public void registerConnectionPool(String poolId,
                                   RemoteConnectionPoolSurface remoteSurface)
                            throws UnknownHostException,
                                   NoSuchMethodException,
                                   MalformedURLException,
                                   RemoteException,
                                   NamingException
Specified by:
registerConnectionPool in interface ConnectionPoolMonitorsMBean
Throws:
UnknownHostException
NoSuchMethodException
MalformedURLException
RemoteException
NamingException

removeConnectionPool

public void removeConnectionPool(String poolId)
                          throws ConnectionPoolRegistrationException,
                                 MalformedURLException,
                                 NotBoundException,
                                 RemoteException
Specified by:
removeConnectionPool in interface ConnectionPoolMonitorsMBean
Throws:
ConnectionPoolRegistrationException
MalformedURLException
NotBoundException
RemoteException

getPoolName

public String getPoolName(String poolId)
                   throws ConnectionPoolRegistrationException
Specified by:
getPoolName in interface ConnectionPoolMonitorsMBean
Throws:
ConnectionPoolRegistrationException

startup

public void startup(String poolId)
             throws ConnectionPoolRegistrationException,
                    ConnectionPoolException
Specified by:
startup in interface ConnectionPoolMonitorsMBean
Throws:
ConnectionPoolRegistrationException
ConnectionPoolException

shutdown

public void shutdown(String poolId)
              throws ConnectionPoolRegistrationException,
                     ConnectionPoolException
Specified by:
shutdown in interface ConnectionPoolMonitorsMBean
Throws:
ConnectionPoolRegistrationException
ConnectionPoolException

getPoolSize

public int getPoolSize(String poolId)
                throws ConnectionPoolRegistrationException
Specified by:
getPoolSize in interface ConnectionPoolMonitorsMBean
Throws:
ConnectionPoolRegistrationException

getFreeSize

public int getFreeSize(String poolId)
                throws ConnectionPoolRegistrationException
Specified by:
getFreeSize in interface ConnectionPoolMonitorsMBean
Throws:
ConnectionPoolRegistrationException

getProcessingSize

public int getProcessingSize(String poolId)
                      throws ConnectionPoolRegistrationException
Specified by:
getProcessingSize in interface ConnectionPoolMonitorsMBean
Throws:
ConnectionPoolRegistrationException

isTestOnConnect

public boolean isTestOnConnect(String poolId)
                        throws ConnectionPoolRegistrationException
Specified by:
isTestOnConnect in interface ConnectionPoolMonitorsMBean
Throws:
ConnectionPoolRegistrationException

setTestOnConnect

public void setTestOnConnect(String poolId,
                             boolean testOnConnect)
                      throws ConnectionPoolRegistrationException
Specified by:
setTestOnConnect in interface ConnectionPoolMonitorsMBean
Throws:
ConnectionPoolRegistrationException

isTestOnAcquire

public boolean isTestOnAcquire(String poolId)
                        throws ConnectionPoolRegistrationException
Specified by:
isTestOnAcquire in interface ConnectionPoolMonitorsMBean
Throws:
ConnectionPoolRegistrationException

setTestOnAcquire

public void setTestOnAcquire(String poolId,
                             boolean testOnAcquire)
                      throws ConnectionPoolRegistrationException
Specified by:
setTestOnAcquire in interface ConnectionPoolMonitorsMBean
Throws:
ConnectionPoolRegistrationException

isReportLeaseTimeNanos

public boolean isReportLeaseTimeNanos(String poolId)
                               throws ConnectionPoolRegistrationException
Specified by:
isReportLeaseTimeNanos in interface ConnectionPoolMonitorsMBean
Throws:
ConnectionPoolRegistrationException

setReportLeaseTimeNanos

public void setReportLeaseTimeNanos(String poolId,
                                    boolean reportLeaseTimeNanos)
                             throws ConnectionPoolRegistrationException
Specified by:
setReportLeaseTimeNanos in interface ConnectionPoolMonitorsMBean
Throws:
ConnectionPoolRegistrationException

isExistentiallyAware

public boolean isExistentiallyAware(String poolId)
                             throws ConnectionPoolRegistrationException
Specified by:
isExistentiallyAware in interface ConnectionPoolMonitorsMBean
Throws:
ConnectionPoolRegistrationException

setExistentiallyAware

public void setExistentiallyAware(String poolId,
                                  boolean existentiallyAware)
                           throws ConnectionPoolRegistrationException
Specified by:
setExistentiallyAware in interface ConnectionPoolMonitorsMBean
Throws:
ConnectionPoolRegistrationException

getConnectionTimeoutMillis

public long getConnectionTimeoutMillis(String poolId)
                                throws ConnectionPoolRegistrationException
Specified by:
getConnectionTimeoutMillis in interface ConnectionPoolMonitorsMBean
Throws:
ConnectionPoolRegistrationException

setConnectionTimeoutMillis

public void setConnectionTimeoutMillis(String poolId,
                                       long connectionTimeoutMillis)
                                throws ConnectionPoolRegistrationException
Specified by:
setConnectionTimeoutMillis in interface ConnectionPoolMonitorsMBean
Throws:
ConnectionPoolRegistrationException

getInitialPoolSize

public int getInitialPoolSize(String poolId)
                       throws ConnectionPoolRegistrationException
Specified by:
getInitialPoolSize in interface ConnectionPoolMonitorsMBean
Throws:
ConnectionPoolRegistrationException

getMinPoolSize

public int getMinPoolSize(String poolId)
                   throws ConnectionPoolRegistrationException
Specified by:
getMinPoolSize in interface ConnectionPoolMonitorsMBean
Throws:
ConnectionPoolRegistrationException

setMinPoolSize

public void setMinPoolSize(String poolId,
                           int minPoolSize)
                    throws ConnectionPoolRegistrationException
Specified by:
setMinPoolSize in interface ConnectionPoolMonitorsMBean
Throws:
ConnectionPoolRegistrationException

getMaxPoolSize

public int getMaxPoolSize(String poolId)
                   throws ConnectionPoolRegistrationException
Specified by:
getMaxPoolSize in interface ConnectionPoolMonitorsMBean
Throws:
ConnectionPoolRegistrationException

setMaxPoolSize

public void setMaxPoolSize(String poolId,
                           int maxPoolSize)
                    throws ConnectionPoolRegistrationException
Specified by:
setMaxPoolSize in interface ConnectionPoolMonitorsMBean
Throws:
ConnectionPoolRegistrationException

getAcquireWaitTimeMillis

public long getAcquireWaitTimeMillis(String poolId)
                              throws ConnectionPoolRegistrationException
Specified by:
getAcquireWaitTimeMillis in interface ConnectionPoolMonitorsMBean
Throws:
ConnectionPoolRegistrationException

setAcquireWaitTimeMillis

public void setAcquireWaitTimeMillis(String poolId,
                                     long acquireWaitTimeMillis)
                              throws ConnectionPoolRegistrationException
Specified by:
setAcquireWaitTimeMillis in interface ConnectionPoolMonitorsMBean
Throws:
ConnectionPoolRegistrationException

getMaxLeaseTimeSeconds

public int getMaxLeaseTimeSeconds(String poolId)
                           throws ConnectionPoolRegistrationException
Specified by:
getMaxLeaseTimeSeconds in interface ConnectionPoolMonitorsMBean
Throws:
ConnectionPoolRegistrationException

setMaxLeaseTimeSeconds

public void setMaxLeaseTimeSeconds(String poolId,
                                   int leaseTimeSeconds)
                            throws ConnectionPoolRegistrationException
Specified by:
setMaxLeaseTimeSeconds in interface ConnectionPoolMonitorsMBean
Throws:
ConnectionPoolRegistrationException

getMaxIdleTimeSeconds

public int getMaxIdleTimeSeconds(String poolId)
                          throws ConnectionPoolRegistrationException
Specified by:
getMaxIdleTimeSeconds in interface ConnectionPoolMonitorsMBean
Throws:
ConnectionPoolRegistrationException

setMaxIdleTimeSeconds

public void setMaxIdleTimeSeconds(String poolId,
                                  int maxIdleTimeSeconds)
                           throws ConnectionPoolRegistrationException
Specified by:
setMaxIdleTimeSeconds in interface ConnectionPoolMonitorsMBean
Throws:
ConnectionPoolRegistrationException

getUnreturnedConnectionTimeoutSeconds

public int getUnreturnedConnectionTimeoutSeconds(String poolId)
                                          throws ConnectionPoolRegistrationException
Specified by:
getUnreturnedConnectionTimeoutSeconds in interface ConnectionPoolMonitorsMBean
Throws:
ConnectionPoolRegistrationException

setUnreturnedConnectionTimeoutSeconds

public void setUnreturnedConnectionTimeoutSeconds(String poolId,
                                                  int unreturnedConnectionTimeoutSeconds)
                                           throws ConnectionPoolRegistrationException
Specified by:
setUnreturnedConnectionTimeoutSeconds in interface ConnectionPoolMonitorsMBean
Throws:
ConnectionPoolRegistrationException


Copyright © 2011. All Rights Reserved.