com.cafesoft.core.jdbc
Class StandardConnectionPoolInfo

java.lang.Object
  |
  +--com.cafesoft.core.jdbc.StandardConnectionPoolInfo
All Implemented Interfaces:
ConnectionPoolInfo

public class StandardConnectionPoolInfo
extends Object
implements ConnectionPoolInfo

Standard implementation of the ConnectionPoolInfo interface

Since:
11/4/02
See Also:
ConnectionPoolInfo

Constructor Summary
StandardConnectionPoolInfo(ConnectionPoolConfig config, int numActive, int numIdle)
          Create a new StandardConnectionPoolInfo object
 
Method Summary
 int getActiveConnections()
          Get the total number of active Connections
 ConnectionPoolConfig getConfig()
          Get the ConnectionPool configuration object
 int getIdleConnections()
          Get the total number of idle Connections
 String getTimestamp()
          Get the time this ConnectionPoolInfo object was created
 int getTotalConnections()
          Return the total number of Connections currently established by the ConnectionPool
 String toString()
          Get a String representation of the Object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StandardConnectionPoolInfo

public StandardConnectionPoolInfo(ConnectionPoolConfig config,
                                  int numActive,
                                  int numIdle)
Create a new StandardConnectionPoolInfo object

Parameters:
config - the ConnectionPool's configuration object
numActive - the current number of active Connection objects
numIdle - the current number of idle Connection objects
Method Detail

getTimestamp

public final String getTimestamp()
Get the time this ConnectionPoolInfo object was created

Specified by:
getTimestamp in interface ConnectionPoolInfo
Returns:
the timestamp (in milleseconds) this ConnectionPoolInfo object was created

getConfig

public final ConnectionPoolConfig getConfig()
Get the ConnectionPool configuration object

Specified by:
getConfig in interface ConnectionPoolInfo
Returns:
the ConnectionPool configuration object which contains all of the ConnectionPool's initialization parameters

getTotalConnections

public final int getTotalConnections()
Return the total number of Connections currently established by the ConnectionPool

Specified by:
getTotalConnections in interface ConnectionPoolInfo
Returns:
the combined total of active and idle Connection Objects

getActiveConnections

public final int getActiveConnections()
Get the total number of active Connections

Specified by:
getActiveConnections in interface ConnectionPoolInfo
Returns:
the number of active Connection objects

getIdleConnections

public final int getIdleConnections()
Get the total number of idle Connections

Specified by:
getIdleConnections in interface ConnectionPoolInfo
Returns:
the number of idle Connection objects

toString

public String toString()
Get a String representation of the Object

Overrides:
toString in class Object
Returns:
a String representation of the Object


Generated on 5:16:42 PM May 12, 2008, © 1996-2005 Cafésoft LLC. All rights reserved.