public final class ConnectionPool
extends java.lang.Object
Address
may share a Connection
. This class implements the policy
of which connections to keep open for future use.Modifier and Type | Field and Description |
---|---|
(package private) RealConnectionPool |
delegate |
Constructor and Description |
---|
ConnectionPool()
Create a new connection pool with tuning parameters appropriate for a single-user application.
|
ConnectionPool(int maxIdleConnections,
long keepAliveDuration,
java.util.concurrent.TimeUnit timeUnit) |
Modifier and Type | Method and Description |
---|---|
int |
connectionCount()
Returns total number of connections in the pool.
|
void |
evictAll()
Close and remove all idle connections in the pool.
|
int |
idleConnectionCount()
Returns the number of idle connections in the pool.
|
final RealConnectionPool delegate
public ConnectionPool()
public ConnectionPool(int maxIdleConnections, long keepAliveDuration, java.util.concurrent.TimeUnit timeUnit)