com.cafesoft.core.jdbc
Interface ConnectionPool

All Superinterfaces:
Debuggable, LoggerClient
All Known Implementing Classes:
StandardConnectionPool

public interface ConnectionPool
extends Debuggable, LoggerClient

Interface for an ObjectPool of java.sql.Connection Objects

Since:
10/31/02
See Also:
Connection

Method Summary
 void close()
          Close the ConnectionPool
 void destroy()
          Destroy the ConnectionPool
 ConnectionPoolAuthenticator getAuthenticator()
          Get the ConnectionPool's ConnectionPoolAuthenticator
 Connection getConnection()
          Get a Connection from the Pool
 ConnectionPoolInfo getInfo()
          Get information about the ConnectionPool Object
 void refreshConnections()
          Refresh all inactive Connections in the ConnectionPool
 void returnConnection(Connection c)
          Return a Connection to the Pool
 void setAuthenticator(ConnectionPoolAuthenticator authenticator)
          Set the ConnectionPoolAuthenticator for this ConnectionPool
 void shrinkConnections()
          Shrink inactive Connections This method will destroy any inactive Connection that is above the ConnectionPool's minimum number of connection value
 
Methods inherited from interface com.cafesoft.core.util.Debuggable
setDebug
 
Methods inherited from interface com.cafesoft.core.log.LoggerClient
setLogger
 

Method Detail

getInfo

public ConnectionPoolInfo getInfo()
Get information about the ConnectionPool Object

Returns:
a ConnectionPoolInfo object which contains the current state of the ConnectionPool Object

setAuthenticator

public void setAuthenticator(ConnectionPoolAuthenticator authenticator)
Set the ConnectionPoolAuthenticator for this ConnectionPool

Parameters:
authenticator - the new ConnectionPoolAuthenticator

getAuthenticator

public ConnectionPoolAuthenticator getAuthenticator()
Get the ConnectionPool's ConnectionPoolAuthenticator

Returns:
the ConnectionPoolAuthenticator

getConnection

public Connection getConnection()
                         throws ConnectionPoolException
Get a Connection from the Pool

Returns:
a valid Connection Object that is ready to be used by the application retrieving the Connection object
Throws:
ConnectionPoolException - thrown if the ConnectionPool is at it's maximum or if the pool has closed

returnConnection

public void returnConnection(Connection c)
Return a Connection to the Pool

Parameters:
c - the Connection to return, if c is null the method simply returns

refreshConnections

public void refreshConnections()
                        throws ConnectionPoolException
Refresh all inactive Connections in the ConnectionPool

Throws:
ConnectionPoolException - thrown if an error occurs refreshing the Connections

shrinkConnections

public void shrinkConnections()
                       throws ConnectionPoolException
Shrink inactive Connections

This method will destroy any inactive Connection that is above the ConnectionPool's minimum number of connection value

Throws:
ConnectionPoolException - thrown if an error occurs shrinking the Connections

close

public void close()
Close the ConnectionPool


destroy

public void destroy()
Destroy the ConnectionPool



Generated on 8:41:50 AM June 06, 2005, © 1996-2005 Cafésoft LLC. All rights reserved.