|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ning.http.client.providers.netty.NettyConnectionsPool
public class NettyConnectionsPool
A simple implementation of ConnectionsPool
based on a ConcurrentHashMap
Constructor Summary | |
---|---|
NettyConnectionsPool(int maxTotalConnections,
int maxConnectionPerHost,
long maxIdleTime,
int maxConnectionLifeTimeInMs,
boolean sslConnectionPoolEnabled,
org.jboss.netty.util.HashedWheelTimer hashedWheelTimer)
|
|
NettyConnectionsPool(NettyAsyncHttpProvider provider,
org.jboss.netty.util.HashedWheelTimer hashedWheelTimer)
|
Method Summary | |
---|---|
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.jboss.netty.channel.Channel channel)
Add a connection tpo the pool |
org.jboss.netty.channel.Channel |
poll(String uri)
Remove the connection associated with the uri. |
boolean |
removeAll(org.jboss.netty.channel.Channel channel)
Remove all connections from the cache. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NettyConnectionsPool(NettyAsyncHttpProvider provider, org.jboss.netty.util.HashedWheelTimer hashedWheelTimer)
public NettyConnectionsPool(int maxTotalConnections, int maxConnectionPerHost, long maxIdleTime, int maxConnectionLifeTimeInMs, boolean sslConnectionPoolEnabled, org.jboss.netty.util.HashedWheelTimer hashedWheelTimer)
Method Detail |
---|
public boolean offer(String uri, org.jboss.netty.channel.Channel channel)
offer
in interface ConnectionsPool<String,org.jboss.netty.channel.Channel>
uri
- a uri used to retrieve the cached connectionchannel
- an I/O connection
public org.jboss.netty.channel.Channel poll(String uri)
poll
in interface ConnectionsPool<String,org.jboss.netty.channel.Channel>
uri
- the uri used when invoking addConnection
public boolean removeAll(org.jboss.netty.channel.Channel channel)
removeAll
in interface ConnectionsPool<String,org.jboss.netty.channel.Channel>
channel
- a connection
public boolean canCacheConnection()
ConnectionsPool.offer(Object, Object)
canCacheConnection
in interface ConnectionsPool<String,org.jboss.netty.channel.Channel>
public void destroy()
destroy
in interface ConnectionsPool<String,org.jboss.netty.channel.Channel>
public final String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |