public class JDBCDiskCachePoolAccess extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_POOL_NAME
The default Pool Name to which the connection pool will be keyed.
|
| Constructor and Description |
|---|
JDBCDiskCachePoolAccess(String poolName)
Configures the pool name to use for the pool access.
|
| Modifier and Type | Method and Description |
|---|---|
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() |
public static final String DEFAULT_POOL_NAME
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 - public Connection getConnection() throws SQLException
SQLExceptionpublic int getNumIdleInPool()
public int getNumActiveInPool()
public void shutdownDriver()
throws SQLException
ExceptionSQLExceptionpublic 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 SQLException
connectURI - userName - password - maxActive - max connectionsSQLException - if a database access error occurspublic void logDriverStats()
throws SQLException
ExceptionSQLExceptionCopyright © 2002–2015 The Apache Software Foundation. All rights reserved.