public class JDBCDiskCachePoolAccess
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_POOL_NAME
The defualt Pool Name to which the connetion pool will be keyed.
|
Constructor and Description |
---|
JDBCDiskCachePoolAccess(java.lang.String poolName)
Configures the pool name to use for the pool access.
|
Modifier and Type | Method and Description |
---|---|
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() |
public static final java.lang.String DEFAULT_POOL_NAME
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
- 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 connetionsjava.lang.Exception
public void logDriverStats() throws java.lang.Exception
java.lang.Exception
Copyright © 2002-2013 Apache Software Foundation. All Rights Reserved.