|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Interface specifing the behavior and functionality required of a connection broker/pooler.
| Field Summary | |
static java.lang.String |
DB_ATTEMPTS_KEY
String constant used in database connection property files as the key for the database driver information |
static java.lang.String |
DB_CONNTIMEOUT_KEY
String constant used in database connection property files as the key for the number of milliseconds to keep pooled connections not in use active and open |
static java.lang.String |
DB_DRIVER_KEY
String constant used in database connection property files as the key for the database driver information |
static java.lang.String |
DB_MAXCONN_KEY
String constant used in database connection property files as the key for the maximum connection pool size |
static java.lang.String |
DB_MINCONN_KEY
String constant used in database connection property files as the key for the minimum connection pool size |
static java.lang.String |
DB_PWD_KEY
String constant used in database connection property files as the key for the database password information |
static java.lang.String |
DB_URL_KEY
String constant used in database connection property files as the key for the database url information |
static java.lang.String |
DB_USERNAME_KEY
String constant used in database connection property files as the key for the database username information |
static java.lang.String |
DB_WAITTIME_KEY
String constant used in database connection property files as the key for the number of seconds to wait before retrying to obtain a connection from the pool (after a failed attempt) |
static int |
MAX_CONNECTIONS
The default maximum number of connections to be pooled |
static int |
MIN_CONNECTIONS
The default maximum number of connections to be pooled |
| Method Summary | |
void |
freeConnection(java.sql.Connection c)
Returns the connection from use and releases it back tot he pool of available connections which can be accessed by requestors. |
int |
getMaxConnections()
Returns the current setting for the maximum allowable size of the connection pool. |
int |
getMaxDbAttempts()
Returns the current setting for the maximum number of consecutive attempts at requesting a connection from the pool (without obtaining a free connection), before generating an error. |
int |
getMinConnections()
Returns the current setting for the minimum allowable size of the connection pool. |
int |
getNumberFreeConnections()
Returns the number of currently free and available connections in the pool |
long |
getTimeout()
Returns the current setting for the number of milliseconds to keep pooled connections not in use active and open. |
void |
setMaxConnections(int i)
Sets the maximum allowable size of the connection pool. |
void |
setMaxDbAttempts(int i)
Sets the maximum number of consecutive attempts allowed when requesting a connection from the pool (without obtaining a free connection), before generating an error. |
void |
setMinConnections(int i)
Sets the minimum allowable size of the connection pool. |
void |
setTimeout(long l)
Sets the number of milliseconds to keep pooled connections not in use active and open. |
| Methods inherited from interface javax.sql.DataSource |
getConnection, getConnection, getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter |
| Field Detail |
public static final java.lang.String DB_DRIVER_KEY
public static final java.lang.String DB_URL_KEY
public static final java.lang.String DB_USERNAME_KEY
public static final java.lang.String DB_PWD_KEY
public static final java.lang.String DB_MINCONN_KEY
public static final java.lang.String DB_MAXCONN_KEY
public static final java.lang.String DB_ATTEMPTS_KEY
public static final java.lang.String DB_WAITTIME_KEY
public static final java.lang.String DB_CONNTIMEOUT_KEY
public static final int MAX_CONNECTIONS
public static final int MIN_CONNECTIONS
| Method Detail |
public void freeConnection(java.sql.Connection c)
c - the connection to return to the available poolpublic int getMaxConnections()
public int getMaxDbAttempts()
public int getMinConnections()
public long getTimeout()
public int getNumberFreeConnections()
public void setMaxConnections(int i)
i - the maximum allowable size of the connection poolpublic void setMaxDbAttempts(int i)
i - the maximum number of attempts to obtain a free connection from the poolpublic void setMinConnections(int i)
i - the minimum allowable size of the connection poolpublic void setTimeout(long l)
l - the number of milliseconds to keep pooled connections not in use active and open
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||