public abstract class BaseHikariPool extends Object implements HikariPoolMXBean, IBagStateListener
| Modifier and Type | Field and Description |
|---|---|
String |
catalog |
boolean |
isAutoCommit |
boolean |
isReadOnly |
int |
transactionIsolation |
| Constructor and Description |
|---|
BaseHikariPool(HikariConfig configuration)
Construct a HikariPool with the specified configuration.
|
BaseHikariPool(HikariConfig configuration,
String username,
String password)
Construct a HikariPool with the specified configuration.
|
| Modifier and Type | Method and Description |
|---|---|
Future<Boolean> |
addBagItem() |
void |
evictConnection(IHikariConnectionProxy proxyConnection)
Evict a connection from the pool.
|
int |
getActiveConnections() |
HikariConfig |
getConfiguration()
Get the pool configuration object.
|
Connection |
getConnection()
Get a connection from the pool, or timeout after connectionTimeout milliseconds.
|
Connection |
getConnection(long hardTimeout)
Get a connection from the pool, or timeout after the specified number of milliseconds.
|
DataSource |
getDataSource()
Get the wrapped DataSource.
|
int |
getIdleConnections() |
int |
getThreadsAwaitingConnection() |
int |
getTotalConnections() |
void |
logPoolState(String... prefix) |
void |
releaseConnection(PoolBagEntry bagEntry)
Release a connection back to the pool, or permanently close it if it is broken.
|
void |
resumePool() |
void |
setHealthCheckRegistry(Object healthCheckRegistry) |
void |
setMetricRegistry(Object metricRegistry) |
void |
shutdown()
Shutdown the pool, closing all idle connections and aborting or closing
active connections.
|
void |
suspendPool() |
String |
toString() |
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitsoftEvictConnectionspublic final String catalog
public final boolean isReadOnly
public final boolean isAutoCommit
public int transactionIsolation
public BaseHikariPool(HikariConfig configuration)
configuration - a HikariConfig instancepublic BaseHikariPool(HikariConfig configuration, String username, String password)
configuration - a HikariConfig instanceusername - authentication usernamepassword - authentication passwordpublic final Connection getConnection() throws SQLException
SQLException - thrown if a timeout occurs trying to obtain a connectionpublic final Connection getConnection(long hardTimeout) throws SQLException
hardTimeout - the maximum time to wait for a connection from the poolSQLException - thrown if a timeout occurs trying to obtain a connectionpublic final void releaseConnection(PoolBagEntry bagEntry)
bagEntry - the PoolBagEntry to release back to the poolpublic final void shutdown()
throws InterruptedException
InterruptedException - thrown if the thread is interrupted during shutdownpublic final void evictConnection(IHikariConnectionProxy proxyConnection)
proxyConnection - the connection to evictpublic final DataSource getDataSource()
public final HikariConfig getConfiguration()
HikariConfig for this poolpublic final int getActiveConnections()
getActiveConnections in interface HikariPoolMXBeanpublic final int getIdleConnections()
getIdleConnections in interface HikariPoolMXBeanpublic final int getTotalConnections()
getTotalConnections in interface HikariPoolMXBeanpublic final int getThreadsAwaitingConnection()
getThreadsAwaitingConnection in interface HikariPoolMXBeanpublic final void suspendPool()
suspendPool in interface HikariPoolMXBeanpublic final void resumePool()
resumePool in interface HikariPoolMXBeanpublic void setMetricRegistry(Object metricRegistry)
public void setHealthCheckRegistry(Object healthCheckRegistry)
public Future<Boolean> addBagItem()
addBagItem in interface IBagStateListenerpublic final void logPoolState(String... prefix)
Copyright © 2016 Zaxxer.com. All Rights Reserved.