| Modifier and Type | Field and Description |
|---|---|
protected static int |
MAJOR_VERSION |
protected static int |
MINOR_VERSION |
protected static HashMap<String,ObjectPool<? extends Connection>> |
pools
The map of registered pools.
|
static String |
URL_PREFIX
My URL prefix
|
protected static int |
URL_PREFIX_LEN |
| Modifier | Constructor and Description |
|---|---|
|
PoolingDriver()
Constructs a new driver with
accessToUnderlyingConnectionAllowed enabled. |
protected |
PoolingDriver(boolean accessToUnderlyingConnectionAllowed)
For unit testing purposes.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptsURL(String url) |
void |
closePool(String name)
Closes a named pool.
|
Connection |
connect(String url,
Properties info) |
ObjectPool<? extends Connection> |
getConnectionPool(String name)
Gets the connection pool for the given name.
|
int |
getMajorVersion() |
int |
getMinorVersion() |
Logger |
getParentLogger() |
String[] |
getPoolNames()
Gets the pool names.
|
DriverPropertyInfo[] |
getPropertyInfo(String url,
Properties info) |
void |
invalidateConnection(Connection conn)
Invalidates the given connection.
|
protected boolean |
isAccessToUnderlyingConnectionAllowed()
Returns the value of the accessToUnderlyingConnectionAllowed property.
|
boolean |
jdbcCompliant() |
void |
registerPool(String name,
ObjectPool<? extends Connection> pool)
Registers a named pool.
|
protected static final HashMap<String,ObjectPool<? extends Connection>> pools
public static final String URL_PREFIX
protected static final int URL_PREFIX_LEN
protected static final int MAJOR_VERSION
protected static final int MINOR_VERSION
public PoolingDriver()
accessToUnderlyingConnectionAllowed enabled.protected PoolingDriver(boolean accessToUnderlyingConnectionAllowed)
accessToUnderlyingConnectionAllowed - Do DelegatingConnections created by this driver permit access to the delegate?public boolean acceptsURL(String url) throws SQLException
acceptsURL in interface DriverSQLExceptionpublic void closePool(String name) throws SQLException
name - The pool name.SQLException - Thrown when a problem is caught closing the pool.public Connection connect(String url, Properties info) throws SQLException
connect in interface DriverSQLExceptionpublic ObjectPool<? extends Connection> getConnectionPool(String name) throws SQLException
name - The pool nameSQLException - Thrown when the named pool is not registered.public int getMajorVersion()
getMajorVersion in interface Driverpublic int getMinorVersion()
getMinorVersion in interface Driverpublic Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger in interface DriverSQLFeatureNotSupportedExceptionpublic String[] getPoolNames()
public DriverPropertyInfo[] getPropertyInfo(String url, Properties info)
getPropertyInfo in interface Driverpublic void invalidateConnection(Connection conn) throws SQLException
conn - connection to invalidateSQLException - if the connection is not a PoolGuardConnectionWrapper or an error occurs invalidating
the connectionprotected boolean isAccessToUnderlyingConnectionAllowed()
public boolean jdbcCompliant()
jdbcCompliant in interface Driverpublic void registerPool(String name, ObjectPool<? extends Connection> pool)
name - The pool name.pool - The pool.Copyright © 2000-2022 Apache Software Foundation. All Rights Reserved.