Expose suspend/resumePool on the HikariDataSource (not just via JMX)

2.3.0
Brett Wooldridge 10 years ago
parent a786a6be32
commit f4818f535e

@ -231,6 +231,27 @@ public class HikariDataSource extends HikariConfig implements DataSource, Closea
}
}
/**
* Suspend allocation of connections from the pool. All callers to <code>getConnection()</code>
* will block indefinitely until <code>resumePool()</code> is called.
*/
public void suspendPool()
{
if (!isShutdown && pool != null) {
pool.suspendPool();
}
}
/**
* Resume allocation of connections from the pool.
*/
public void resumePool()
{
if (!isShutdown && pool != null) {
pool.resumePool();
}
}
/**
* <code>close()</code> and <code>shutdown()</code> are synonymous.
*/

Loading…
Cancel
Save