public class GrizzlyConnectionPool extends Object implements ConnectionPool
ConnectionPool implementation.| Modifier and Type | Class and Description |
|---|---|
static class |
GrizzlyConnectionPool.DelayedExecutor |
| Constructor and Description |
|---|
GrizzlyConnectionPool(AsyncHttpClientConfig config) |
GrizzlyConnectionPool(boolean cacheSSLConnections,
int timeout,
int maxConnectionLifeTime,
int maxConnectionsPerHost,
int maxConnections,
GrizzlyConnectionPool.DelayedExecutor delayedExecutor) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canCacheConnection()
Return true if a connection can be cached.
|
void |
destroy()
Destroy all connections that has been cached by this instance.
|
boolean |
offer(String uri,
org.glassfish.grizzly.Connection connection)
Add a connection tpo the pool
|
org.glassfish.grizzly.Connection |
poll(String uri)
Remove the connection associated with the uri.
|
boolean |
removeAll(org.glassfish.grizzly.Connection connection)
Remove all connections from the cache.
|
public GrizzlyConnectionPool(boolean cacheSSLConnections,
int timeout,
int maxConnectionLifeTime,
int maxConnectionsPerHost,
int maxConnections,
GrizzlyConnectionPool.DelayedExecutor delayedExecutor)
public GrizzlyConnectionPool(AsyncHttpClientConfig config)
public boolean offer(String uri, org.glassfish.grizzly.Connection connection)
ConnectionPooloffer in interface ConnectionPooluri - a uri used to retrieve the cached connectionconnection - an I/O connectionpublic org.glassfish.grizzly.Connection poll(String uri)
ConnectionPoolpoll in interface ConnectionPooluri - the uri used when invoking addConnectionpublic boolean removeAll(org.glassfish.grizzly.Connection connection)
ConnectionPoolremoveAll in interface ConnectionPoolconnection - a connectionpublic boolean canCacheConnection()
ConnectionPoolConnectionPool#offer(Object, Object)canCacheConnection in interface ConnectionPoolpublic void destroy()
ConnectionPooldestroy in interface ConnectionPoolCopyright © 2015. All Rights Reserved.