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 and 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 and Description |
|---|---|
int |
connectionCount() |
void |
evictAll() |
int |
idleConnectionCount() |
public ConnectionPool()
public ConnectionPool(int maxIdleConnections,
long keepAliveDuration,
TimeUnit timeUnit)
public int idleConnectionCount()
public int connectionCount()
idleConnectionCount() to count connections not currently
in use.public void evictAll()
Copyright © 2019. All rights reserved.