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(ConnectionAddedEvent event)
Invoked when a connection is added to a pool.
|
void |
connectionCheckedIn(ConnectionCheckedInEvent event)
Invoked when a connection is checked in to a pool.
|
void |
connectionCheckedOut(ConnectionCheckedOutEvent event)
Invoked when a connection is checked out of a pool.
|
void |
connectionRemoved(ConnectionRemovedEvent 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(ConnectionPoolWaitQueueEnteredEvent event)
Invoked when a connection pool's wait queue is entered.
|
void |
waitQueueExited(ConnectionPoolWaitQueueExitedEvent event)
Invoked when a connection pools wait queue is exited.
|
connectionPoolClosed, connectionPoolOpened
private 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
ConnectionPoolStatistics(ConnectionPoolOpenedEvent event)
public java.lang.String getHost()
ConnectionPoolStatisticsMBean
getHost
in interface ConnectionPoolStatisticsMBean
public int getPort()
ConnectionPoolStatisticsMBean
getPort
in interface ConnectionPoolStatisticsMBean
public int getMinSize()
ConnectionPoolStatisticsMBean
getMinSize
in interface ConnectionPoolStatisticsMBean
public int getMaxSize()
ConnectionPoolStatisticsMBean
getMaxSize
in interface ConnectionPoolStatisticsMBean
public int getSize()
ConnectionPoolStatisticsMBean
getSize
in interface ConnectionPoolStatisticsMBean
public int getCheckedOutCount()
ConnectionPoolStatisticsMBean
getCheckedOutCount
in interface ConnectionPoolStatisticsMBean
public int getWaitQueueSize()
ConnectionPoolStatisticsMBean
getWaitQueueSize
in interface ConnectionPoolStatisticsMBean
public void connectionCheckedOut(ConnectionCheckedOutEvent event)
ConnectionPoolListener
connectionCheckedOut
in interface ConnectionPoolListener
connectionCheckedOut
in class ConnectionPoolListenerAdapter
event
- the eventpublic void connectionCheckedIn(ConnectionCheckedInEvent event)
ConnectionPoolListener
connectionCheckedIn
in interface ConnectionPoolListener
connectionCheckedIn
in class ConnectionPoolListenerAdapter
event
- the eventpublic void connectionAdded(ConnectionAddedEvent event)
ConnectionPoolListener
connectionAdded
in interface ConnectionPoolListener
connectionAdded
in class ConnectionPoolListenerAdapter
event
- the eventpublic void connectionRemoved(ConnectionRemovedEvent event)
ConnectionPoolListener
connectionRemoved
in interface ConnectionPoolListener
connectionRemoved
in class ConnectionPoolListenerAdapter
event
- the eventpublic void waitQueueEntered(ConnectionPoolWaitQueueEnteredEvent event)
ConnectionPoolListener
waitQueueEntered
in interface ConnectionPoolListener
waitQueueEntered
in class ConnectionPoolListenerAdapter
event
- the eventpublic void waitQueueExited(ConnectionPoolWaitQueueExitedEvent event)
ConnectionPoolListener
waitQueueExited
in interface ConnectionPoolListener
waitQueueExited
in class ConnectionPoolListenerAdapter
event
- the event