C
- public interface DbPoolService<C>
Modifier and Type | Method and Description |
---|---|
java.util.concurrent.Future<java.sql.Connection> |
getConnection(ConnectionPoolConfig config)
Retrieves a
Future that contains a connection config for the pool
specified by the supplied ConnectionPoolConfig object. |
java.util.concurrent.Future<java.sql.Connection> |
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<ConnectionPoolConfig,C> |
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. |
java.util.concurrent.Future<java.sql.Connection> getConnection(ConnectionPoolConfig config) throws java.sql.SQLException
Future
that contains a connection config for the pool
specified by the supplied ConnectionPoolConfig
object.config
- The config object specifying the connection poolFuture
java.sql.SQLException
boolean isActive()
java.util.concurrent.Future<java.sql.Connection> getConnection(ConnectionPoolConfig poolConfig, ConnectionConfig connConfig) throws java.sql.SQLException
Future
that contains a connection object for the pool
specified by the supplied ConnectionPoolConfig
object. The connection
is configured as specified by the ConnectionConfig
.poolConfig
- The config object specifying the poolconnConfig
- A config object specifying connection propertiesFuture
java.sql.SQLException
javax.sql.DataSource getDataSource(ConnectionPoolConfig config)
javax.sql.DataSource getDataSource(ConnectionPoolConfig poolConfig, ConnectionConfig connConfig)
java.util.Map<ConnectionPoolConfig,C> getPoolMap()
void shutdownPool(ConnectionPoolConfig poolConfig)
ConnectionPoolConfig
object.poolConfig
- The pool identifiervoid shutdownAll()