public interface ConnectionsPool<U,V>
AsyncHttpProvider
for caching http connections.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(U uri,
V connection)
Add a connection tpo the pool
|
V |
poll(U uri)
Remove the connection associated with the uri.
|
boolean |
removeAll(V connection)
Remove all connections from the cache.
|
boolean offer(U uri, V connection)
uri
- a uri used to retrieve the cached connectionconnection
- an I/O connectionV poll(U uri)
uri
- the uri used when invoking addConnectionboolean removeAll(V connection)
connection
- a connectionboolean canCacheConnection()
offer(Object, Object)
void destroy()
Copyright © 2014. All Rights Reserved.