public class MetaPoolService extends java.lang.Object implements DbPoolService
DbC3p0PoolServiceImpl
as backend.Constructor and Description |
---|
MetaPoolService(DbPoolService c3p0,
<any> useConnectionPool,
JdbcService jdbcService) |
Modifier and Type | Method and Description |
---|---|
DbPoolService |
getActiveService() |
DbPoolService |
getC3P0() |
java.util.concurrent.Future |
getConnection(ConnectionPoolConfig config)
Retrieves a
Future that contains a connection config for the pool
specified by the supplied ConnectionPoolConfig object. |
java.util.concurrent.Future |
getConnection(ConnectionPoolConfig poolConfig,
ConnectionConfig connConfig)
Retrieves a
Future that contains a connection object for the pool
specified by the supplied ConnectionPoolConfig object. |
javax.sql.DataSource |
getDataSource(ConnectionPoolConfig config) |
javax.sql.DataSource |
getDataSource(ConnectionPoolConfig poolConfig,
ConnectionConfig connConfig) |
java.util.Map |
getPoolMap()
Returns a map of all active pools.
|
boolean |
isActive()
Returns true if an active pool exists.
|
void |
shutdownAll()
Asks all available connection pools to be closed
|
void |
shutdownPool(ConnectionPoolConfig poolConfig)
Shuts down the pool identified by the
ConnectionPoolConfig object. |
public MetaPoolService(DbPoolService c3p0, <any> useConnectionPool, JdbcService jdbcService)
public java.util.concurrent.Future getConnection(ConnectionPoolConfig config) throws java.sql.SQLException
DbPoolService
Future
that contains a connection config for the pool
specified by the supplied ConnectionPoolConfig
object.getConnection
in interface DbPoolService
config
- The config object specifying the connection poolFuture
java.sql.SQLException
public DbPoolService getActiveService()
public DbPoolService getC3P0()
public boolean isActive()
DbPoolService
isActive
in interface DbPoolService
public java.util.concurrent.Future getConnection(ConnectionPoolConfig poolConfig, ConnectionConfig connConfig) throws java.sql.SQLException
DbPoolService
Future
that contains a connection object for the pool
specified by the supplied ConnectionPoolConfig
object. The connection
is configured as specified by the ConnectionConfig
.getConnection
in interface DbPoolService
poolConfig
- The config object specifying the poolconnConfig
- A config object specifying connection propertiesFuture
java.sql.SQLException
public java.util.Map getPoolMap()
DbPoolService
getPoolMap
in interface DbPoolService
public void shutdownPool(ConnectionPoolConfig poolConfig)
DbPoolService
ConnectionPoolConfig
object.shutdownPool
in interface DbPoolService
poolConfig
- The pool identifierpublic void shutdownAll()
DbPoolService
shutdownAll
in interface DbPoolService
public javax.sql.DataSource getDataSource(ConnectionPoolConfig config)
getDataSource
in interface DbPoolService
public javax.sql.DataSource getDataSource(ConnectionPoolConfig poolConfig, ConnectionConfig connConfig)
getDataSource
in interface DbPoolService