public class Admin
extends java.lang.Object
| Constructor | Description |
|---|---|
Admin(ConnectionPoolDefinitionIF definition) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addStatisticsListener(StatisticsListenerIF statisticsListener) |
|
void |
cancelAll() |
Cancels the timer that outputs the stats
|
void |
connectionRefused() |
Call this every time a connection is refused
|
void |
connectionReturned(long activeTime) |
Call this every time an active connection is returned to the pool
|
static SnapshotIF |
getSnapshot(ConnectionPoolStatisticsIF cps,
ConnectionPoolDefinitionIF cpd,
java.util.Collection connectionInfos) |
Get a new snapshot
|
StatisticsIF[] |
getStatistics() |
|
StatisticsIF |
getStatistics(java.lang.String token) |
Returns the most recent sample that has completed its period
|
public Admin(ConnectionPoolDefinitionIF definition) throws ProxoolException
definition - gives access to pool definitiondefinition - see definitionProxoolExceptionpublic void addStatisticsListener(StatisticsListenerIF statisticsListener)
public void connectionReturned(long activeTime)
activeTime - how long the connection was activepublic void connectionRefused()
public StatisticsIF getStatistics(java.lang.String token)
public void cancelAll()
public StatisticsIF[] getStatistics()
public static SnapshotIF getSnapshot(ConnectionPoolStatisticsIF cps, ConnectionPoolDefinitionIF cpd, java.util.Collection connectionInfos)
cps - used to help populate the snapshotcpd - used to help populate the snapshot