|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.cafesoft.core.jdbc.StandardConnectionPool
Standard implementation of the ConnectionPool interface
ConnectionPool| 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 |
static ConnectionPool |
getInstance(ConnectionPoolConfig poolConfig)
Static constructor This constructor invokes the private constructor and then invokes the private initialize method. |
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 |
boolean |
setDebug(boolean enable)
Enable or disable debugging. |
void |
setLogger(Logger logger)
Sets the logger. |
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 class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static ConnectionPool getInstance(ConnectionPoolConfig poolConfig)
throws ConnectionPoolException
This constructor invokes the private constructor and then invokes the private initialize method. The result is a ConnectionPool that has it's minimum number of connections created and is ready to be used.
poolConfig - the ConnectionPool configuration object
ConnectionPoolExceptionpublic void setLogger(Logger logger)
setLogger in interface LoggerClientlogger - logs messagespublic boolean setDebug(boolean enable)
setDebug in interface Debuggableenable - if true, enable debugging, else disable debugging.
public ConnectionPoolInfo getInfo()
getInfo in interface ConnectionPoolpublic void setAuthenticator(ConnectionPoolAuthenticator authenticator)
setAuthenticator in interface ConnectionPoolauthenticator - the new ConnectionPoolAuthenticatorpublic ConnectionPoolAuthenticator getAuthenticator()
getAuthenticator in interface ConnectionPool
public Connection getConnection()
throws ConnectionPoolException
getConnection in interface ConnectionPoolConnectionPoolException - thrown if the ConnectionPool is at it's maximum or
if the pool has closedpublic void returnConnection(Connection c)
returnConnection in interface ConnectionPoolc - the Connection to return, if c is null the method
simply returns
public void shrinkConnections()
throws ConnectionPoolException
This method will destroy any inactive Connection that is above the ConnectionPool's minimum number of connection value
shrinkConnections in interface ConnectionPoolConnectionPoolException - thrown if an error occurs shrinking the Connections
public void refreshConnections()
throws ConnectionPoolException
refreshConnections in interface ConnectionPoolConnectionPoolException - thrown if an error occurs refreshing the Connectionspublic void close()
close in interface ConnectionPoolpublic void destroy()
destroy in interface ConnectionPool
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||