|
||||||||||
| 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 String |
DEFAULT_POOL_NAME
The default Pool Name to which the connection pool will be keyed. |
| Constructor Summary | |
|---|---|
JDBCDiskCachePoolAccess(String poolName)
Configures the pool name to use for the pool access. |
|
| Method Summary | |
|---|---|
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. |
String |
getPoolName()
|
String |
getPoolUrl()
|
void |
logDriverStats()
|
void |
setPoolName(String poolName)
|
void |
setupDriver(String connectURI,
String userName,
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 String DEFAULT_POOL_NAME
| Constructor Detail |
|---|
public JDBCDiskCachePoolAccess(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 Connection getConnection()
throws SQLException
SQLExceptionpublic int getNumIdleInPool()
public int getNumActiveInPool()
public void shutdownDriver()
throws Exception
Exceptionpublic String getPoolUrl()
public void setPoolName(String poolName)
poolName - The poolName to set.public String getPoolName()
public void setupDriver(String connectURI,
String userName,
String password,
int maxActive)
throws Exception
connectURI - userName - password - maxActive - max connections
Exception
public void logDriverStats()
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||