public final class ConnectionPool extends Object
Address
may share a Connection
. This class implements the policy
of which connections to keep open for future use.Constructor | Description |
---|---|
ConnectionPool() |
Create a new connection pool with tuning parameters appropriate for a single-user application.
|
ConnectionPool(int maxIdleConnections,
long keepAliveDuration,
TimeUnit timeUnit) |
Modifier and Type | Method | 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.
|
public ConnectionPool()
public ConnectionPool(int maxIdleConnections, long keepAliveDuration, TimeUnit timeUnit)
Copyright © 2020. All rights reserved.