|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jcs.auxiliary.disk.jdbc.JDBCDiskCachePoolAccess
public class JDBCDiskCachePoolAccess
This class provides access to the connection pool. It ensures that the various resources that need to access the tables will be able to use the same pool.
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_POOL_NAME
The defualt Pool Name to which the connetion pool will be keyed. |
Constructor Summary | |
---|---|
JDBCDiskCachePoolAccess(java.lang.String poolName)
Configures the pool name to use for the pool access. |
Method Summary | |
---|---|
java.sql.Connection |
getConnection()
Gets a connection from the pool. |
int |
getNumActiveInPool()
How many are active in the pool. |
int |
getNumIdleInPool()
How many are idle in the pool. |
java.lang.String |
getPoolName()
|
java.lang.String |
getPoolUrl()
|
void |
logDriverStats()
|
void |
setPoolName(java.lang.String poolName)
|
void |
setupDriver(java.lang.String connectURI,
java.lang.String userName,
java.lang.String password,
int maxActive)
|
void |
shutdownDriver()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_POOL_NAME
Constructor Detail |
---|
public JDBCDiskCachePoolAccess(java.lang.String poolName)
This pool name should be unique to the database. It is used as part of the URL each time we lookup a connection from the driver manager.
poolName
- Method Detail |
---|
public java.sql.Connection getConnection() throws java.sql.SQLException
java.sql.SQLException
public int getNumIdleInPool()
public int getNumActiveInPool()
public void shutdownDriver() throws java.lang.Exception
java.lang.Exception
public java.lang.String getPoolUrl()
public void setPoolName(java.lang.String poolName)
poolName
- The poolName to set.public java.lang.String getPoolName()
public void setupDriver(java.lang.String connectURI, java.lang.String userName, java.lang.String password, int maxActive) throws java.lang.Exception
connectURI
- userName
- password
- maxActive
- max connetions
java.lang.Exception
public void logDriverStats() throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |