final class ConnectionPoolStatistics extends ConnectionPoolListenerAdapter implements ConnectionPoolStatisticsMBean
| Modifier and Type | Field and Description |
|---|---|
private java.util.concurrent.atomic.AtomicInteger |
checkedOutCount |
private ServerAddress |
serverAddress |
private ConnectionPoolSettings |
settings |
private java.util.concurrent.atomic.AtomicInteger |
size |
private java.util.concurrent.atomic.AtomicInteger |
waitQueueSize |
| Constructor and Description |
|---|
ConnectionPoolStatistics(ConnectionPoolOpenedEvent event) |
| Modifier and Type | Method and Description |
|---|---|
void |
connectionAdded(ConnectionEvent event)
Invoked when a connection is added to a pool.
|
void |
connectionCheckedIn(ConnectionEvent event)
Invoked when a connection is checked in to a pool.
|
void |
connectionCheckedOut(ConnectionEvent event)
Invoked when a connection is checked out of a pool.
|
void |
connectionRemoved(ConnectionEvent event)
Invoked when a connection is removed from a pool.
|
int |
getCheckedOutCount()
Gets the count of connections that are currently in use.
|
java.lang.String |
getHost()
Gets the host that this connection pool is connecting to.
|
int |
getMaxSize()
Gets the maximum allowed size of the pool, including idle and in-use members.
|
int |
getMinSize()
Gets the minimum allowed size of the pool, including idle and in-use members.
|
int |
getPort()
Gets the port that this connection pool is connecting to.
|
int |
getSize()
Gets the current size of the pool, including idle and and in-use members.
|
int |
getWaitQueueSize()
Gets the size of the wait queue for a connection from this pool.
|
void |
waitQueueEntered(ConnectionPoolWaitQueueEvent event)
Invoked when a connection pool's wait queue is entered.
|
void |
waitQueueExited(ConnectionPoolWaitQueueEvent event)
Invoked when a connection pools wait queue is exited.
|
connectionPoolClosed, connectionPoolOpenedprivate final ServerAddress serverAddress
private final ConnectionPoolSettings settings
private final java.util.concurrent.atomic.AtomicInteger size
private final java.util.concurrent.atomic.AtomicInteger checkedOutCount
private final java.util.concurrent.atomic.AtomicInteger waitQueueSize
public ConnectionPoolStatistics(ConnectionPoolOpenedEvent event)
public java.lang.String getHost()
ConnectionPoolStatisticsMBeangetHost in interface ConnectionPoolStatisticsMBeanpublic int getPort()
ConnectionPoolStatisticsMBeangetPort in interface ConnectionPoolStatisticsMBeanpublic int getMinSize()
ConnectionPoolStatisticsMBeangetMinSize in interface ConnectionPoolStatisticsMBeanpublic int getMaxSize()
ConnectionPoolStatisticsMBeangetMaxSize in interface ConnectionPoolStatisticsMBeanpublic int getSize()
ConnectionPoolStatisticsMBeangetSize in interface ConnectionPoolStatisticsMBeanpublic int getCheckedOutCount()
ConnectionPoolStatisticsMBeangetCheckedOutCount in interface ConnectionPoolStatisticsMBeanpublic int getWaitQueueSize()
ConnectionPoolStatisticsMBeangetWaitQueueSize in interface ConnectionPoolStatisticsMBeanpublic void connectionCheckedOut(ConnectionEvent event)
ConnectionPoolListenerconnectionCheckedOut in interface ConnectionPoolListenerconnectionCheckedOut in class ConnectionPoolListenerAdapterevent - the eventpublic void connectionCheckedIn(ConnectionEvent event)
ConnectionPoolListenerconnectionCheckedIn in interface ConnectionPoolListenerconnectionCheckedIn in class ConnectionPoolListenerAdapterevent - the eventpublic void connectionAdded(ConnectionEvent event)
ConnectionPoolListenerconnectionAdded in interface ConnectionPoolListenerconnectionAdded in class ConnectionPoolListenerAdapterevent - the eventpublic void connectionRemoved(ConnectionEvent event)
ConnectionPoolListenerconnectionRemoved in interface ConnectionPoolListenerconnectionRemoved in class ConnectionPoolListenerAdapterevent - the eventpublic void waitQueueEntered(ConnectionPoolWaitQueueEvent event)
ConnectionPoolListenerwaitQueueEntered in interface ConnectionPoolListenerwaitQueueEntered in class ConnectionPoolListenerAdapterevent - the eventpublic void waitQueueExited(ConnectionPoolWaitQueueEvent event)
ConnectionPoolListenerwaitQueueExited in interface ConnectionPoolListenerwaitQueueExited in class ConnectionPoolListenerAdapterevent - the event