Package org.logicalcobwebs.proxool.admin
Class Admin
- java.lang.Object
-
- org.logicalcobwebs.proxool.admin.Admin
-
public class Admin extends java.lang.ObjectProvides statistics about the performance of a pool.- Since:
- Proxool 0.7
- Version:
- $Revision: 1.9 $, $Date: 2006/01/18 14:39:57 $
- Author:
- bill, $Author: billhorsman $ (current maintainer)
-
-
Constructor Summary
Constructors Constructor Description Admin(ConnectionPoolDefinitionIF definition)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddStatisticsListener(StatisticsListenerIF statisticsListener)voidcancelAll()Cancels the timer that outputs the statsvoidconnectionRefused()Call this every time a connection is refusedvoidconnectionReturned(long activeTime)Call this every time an active connection is returned to the poolstatic SnapshotIFgetSnapshot(ConnectionPoolStatisticsIF cps, ConnectionPoolDefinitionIF cpd, java.util.Collection connectionInfos)Get a new snapshotStatisticsIF[]getStatistics()StatisticsIFgetStatistics(java.lang.String token)Returns the most recent sample that has completed its period
-
-
-
Constructor Detail
-
Admin
public Admin(ConnectionPoolDefinitionIF definition) throws ProxoolException
- Parameters:
definition- gives access to pool definitiondefinition- seedefinition- Throws:
ProxoolException
-
-
Method Detail
-
addStatisticsListener
public void addStatisticsListener(StatisticsListenerIF statisticsListener)
-
connectionReturned
public void connectionReturned(long activeTime)
Call this every time an active connection is returned to the pool- Parameters:
activeTime- how long the connection was active
-
connectionRefused
public void connectionRefused()
Call this every time a connection is refused
-
getStatistics
public StatisticsIF getStatistics(java.lang.String token)
Returns the most recent sample that has completed its period- Returns:
- sample (or null if no statistics are complete yet)
-
cancelAll
public void cancelAll()
Cancels the timer that outputs the stats
-
getStatistics
public StatisticsIF[] getStatistics()
-
getSnapshot
public static SnapshotIF getSnapshot(ConnectionPoolStatisticsIF cps, ConnectionPoolDefinitionIF cpd, java.util.Collection connectionInfos)
Get a new snapshot- Parameters:
cps- used to help populate the snapshotcpd- used to help populate the snapshot- Returns:
- snapshot
-
-