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.| 构造器和说明 |
|---|
ConnectionPool()
Create a new connection pool with tuning parameters appropriate for a single-user application.
|
ConnectionPool(int maxIdleConnections,
long keepAliveDuration,
TimeUnit timeUnit) |
| 限定符和类型 | 方法和说明 |
|---|---|
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 © 2024. All rights reserved.