AbstractConnPool@Deprecated public class ConnPoolByRoute extends AbstractConnPool
MultiThreadedHttpConnectionManager
in HttpClient 3.x, see there for original authors. It implements the same
algorithm for connection re-use and connection-per-host enforcement:
poolLock in the base class,
not via synchronized methods.| Constructor and Description |
|---|
ConnPoolByRoute(ClientConnectionOperator operator,
ConnPerRoute connPerRoute,
int maxTotalConnections)
Deprecated.
Creates a new connection pool, managed by route.
|
ConnPoolByRoute(ClientConnectionOperator operator,
ConnPerRoute connPerRoute,
int maxTotalConnections,
long connTTL,
TimeUnit connTTLTimeUnit)
Deprecated.
|
ConnPoolByRoute(ClientConnectionOperator operator,
HttpParams params)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
closeExpiredConnections()
Deprecated.
|
void |
closeIdleConnections(long idletime,
TimeUnit tunit)
Deprecated.
Closes idle connections.
|
void |
deleteClosedConnections()
Deprecated.
Deletes all entries for closed connections.
|
void |
freeEntry(BasicPoolEntry entry,
boolean reusable,
long validDuration,
TimeUnit timeUnit)
Deprecated.
Returns an entry into the pool.
|
int |
getConnectionsInPool()
Deprecated.
|
int |
getConnectionsInPool(HttpRoute route)
Deprecated.
|
int |
getMaxTotalConnections()
Deprecated.
since 4.1
|
PoolEntryRequest |
requestPoolEntry(HttpRoute route,
Object state)
Deprecated.
Returns a new
PoolEntryRequest, from which a BasicPoolEntry
can be obtained, or the request can be aborted. |
void |
setMaxTotalConnections(int max)
Deprecated.
since 4.1
|
void |
shutdown()
Deprecated.
Shuts down this pool and all associated resources.
|
enableConnectionGC, getEntry, handleReferencepublic ConnPoolByRoute(ClientConnectionOperator operator, ConnPerRoute connPerRoute, int maxTotalConnections)
public ConnPoolByRoute(ClientConnectionOperator operator, ConnPerRoute connPerRoute, int maxTotalConnections, long connTTL, TimeUnit connTTLTimeUnit)
@Deprecated public ConnPoolByRoute(ClientConnectionOperator operator, HttpParams params)
ConnPoolByRoute(ClientConnectionOperator, ConnPerRoute, int)public int getConnectionsInPool(HttpRoute route)
public int getConnectionsInPool()
public PoolEntryRequest requestPoolEntry(HttpRoute route, Object state)
AbstractConnPoolPoolEntryRequest, from which a BasicPoolEntry
can be obtained, or the request can be aborted.requestPoolEntry in class AbstractConnPoolroute - the routestate - the statepublic void freeEntry(BasicPoolEntry entry, boolean reusable, long validDuration, TimeUnit timeUnit)
AbstractConnPoolfreeEntry in class AbstractConnPoolentry - the entry for the connection to releasereusable - true if the entry is deemed
reusable, false otherwise.validDuration - The duration that the entry should remain free and reusable.timeUnit - The unit of time the duration is measured in.public void deleteClosedConnections()
AbstractConnPooldeleteClosedConnections in class AbstractConnPoolpublic void closeIdleConnections(long idletime,
TimeUnit tunit)
closeIdleConnections in class AbstractConnPoolidletime - the time the connections should have been idle
in order to be closed nowtunit - the unit for the idletimepublic void closeExpiredConnections()
closeExpiredConnections in class AbstractConnPoolpublic void shutdown()
AbstractConnPoolshutdown in class AbstractConnPoolpublic void setMaxTotalConnections(int max)
public int getMaxTotalConnections()
Copyright © 2010 - 2020 Adobe. All Rights Reserved