java.lang.Object |
↳ |
com.ning.http.client.providers.netty.NettyConnectionsPool |
Class Overview
A simple implementation of ConnectionsPool
based on a java.util.concurrent.ConcurrentHashMap
Summary
Public Methods |
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, Channel channel)
|
Channel
|
poll(String uri)
|
boolean
|
removeAll(Channel channel)
|
final
String
|
toString()
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0)
|
final
void
|
wait(long arg0, int arg1)
|
|
From interface
com.ning.http.client.ConnectionsPool
abstract
boolean
|
canCacheConnection()
Return true if a connection can be cached.
|
abstract
void
|
destroy()
Destroy all connections that has been cached by this instance.
|
abstract
boolean
|
offer(U uri, V connection)
Add a connection tpo the pool
|
abstract
V
|
poll(U uri)
Remove the connection associated with the uri.
|
abstract
boolean
|
removeAll(V connection)
Remove all connections from the cache.
|
|
Public Constructors
Public Methods
public
boolean
canCacheConnection
()
Return true if a connection can be cached. A implementation can decide based on some rules to allow caching
Calling this method is equivalent of checking the returned value of offer(Object, Object)
Returns
- true if a connection can be cached.
public
void
destroy
()
Destroy all connections that has been cached by this instance.
public
boolean
offer
(String uri, Channel channel)
public
Channel
poll
(String uri)
public
boolean
removeAll
(Channel channel)
public
final
String
toString
()