Package org.apache.http.impl.conn.tsccm
Class ConnPoolByRoute
- java.lang.Object
-
- org.apache.http.impl.conn.tsccm.AbstractConnPool
-
- org.apache.http.impl.conn.tsccm.ConnPoolByRoute
-
@Deprecated public class ConnPoolByRoute extends AbstractConnPool
Deprecated.(4.2) useAbstractConnPoolA connection pool that maintains connections by route. This class is derived fromMultiThreadedHttpConnectionManagerin HttpClient 3.x, see there for original authors. It implements the same algorithm for connection re-use and connection-per-host enforcement:- connections are re-used only for the exact same route
- connection limits are enforced per route rather than per host
poolLockin the base class, not viasynchronizedmethods.- Since:
- 4.0
-
-
Constructor Summary
Constructors Constructor 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, java.util.concurrent.TimeUnit connTTLTimeUnit)Deprecated.ConnPoolByRoute(ClientConnectionOperator operator, HttpParams params)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidcloseExpiredConnections()Deprecated.voidcloseIdleConnections(long idletime, java.util.concurrent.TimeUnit timeUnit)Deprecated.Closes idle connections.voiddeleteClosedConnections()Deprecated.Deletes all entries for closed connections.voidfreeEntry(BasicPoolEntry entry, boolean reusable, long validDuration, java.util.concurrent.TimeUnit timeUnit)Deprecated.Returns an entry into the pool.intgetConnectionsInPool()Deprecated.intgetConnectionsInPool(HttpRoute route)Deprecated.intgetMaxTotalConnections()Deprecated.since 4.1PoolEntryRequestrequestPoolEntry(HttpRoute route, java.lang.Object state)Deprecated.Returns a newPoolEntryRequest, from which aBasicPoolEntrycan be obtained, or the request can be aborted.voidsetMaxTotalConnections(int max)Deprecated.since 4.1voidshutdown()Deprecated.Shuts down this pool and all associated resources.-
Methods inherited from class org.apache.http.impl.conn.tsccm.AbstractConnPool
enableConnectionGC, getEntry, handleReference
-
-
-
-
Constructor Detail
-
ConnPoolByRoute
public ConnPoolByRoute(ClientConnectionOperator operator, ConnPerRoute connPerRoute, int maxTotalConnections)
Deprecated.Creates a new connection pool, managed by route.- Since:
- 4.1
-
ConnPoolByRoute
public ConnPoolByRoute(ClientConnectionOperator operator, ConnPerRoute connPerRoute, int maxTotalConnections, long connTTL, java.util.concurrent.TimeUnit connTTLTimeUnit)
Deprecated.- Since:
- 4.1
-
ConnPoolByRoute
@Deprecated public ConnPoolByRoute(ClientConnectionOperator operator, HttpParams params)
Deprecated.Creates a new connection pool, managed by route.
-
-
Method Detail
-
getConnectionsInPool
public int getConnectionsInPool(HttpRoute route)
Deprecated.
-
getConnectionsInPool
public int getConnectionsInPool()
Deprecated.
-
requestPoolEntry
public PoolEntryRequest requestPoolEntry(HttpRoute route, java.lang.Object state)
Deprecated.Description copied from class:AbstractConnPoolReturns a newPoolEntryRequest, from which aBasicPoolEntrycan be obtained, or the request can be aborted.- Specified by:
requestPoolEntryin classAbstractConnPool- Parameters:
route- the routestate- the state- Returns:
- the entry request
-
freeEntry
public void freeEntry(BasicPoolEntry entry, boolean reusable, long validDuration, java.util.concurrent.TimeUnit timeUnit)
Deprecated.Description copied from class:AbstractConnPoolReturns an entry into the pool. The connection of the entry is expected to be in a suitable state, either open and re-usable, or closed. The pool will not make any attempt to determine whether it can be re-used or not.- Specified by:
freeEntryin classAbstractConnPool- Parameters:
entry- the entry for the connection to releasereusable-trueif the entry is deemed reusable,falseotherwise.validDuration- The duration that the entry should remain free and reusable.timeUnit- The unit of time the duration is measured in.
-
deleteClosedConnections
public void deleteClosedConnections()
Deprecated.Description copied from class:AbstractConnPoolDeletes all entries for closed connections.- Specified by:
deleteClosedConnectionsin classAbstractConnPool
-
closeIdleConnections
public void closeIdleConnections(long idletime, java.util.concurrent.TimeUnit timeUnit)Deprecated.Closes idle connections.- Overrides:
closeIdleConnectionsin classAbstractConnPool- Parameters:
idletime- the time the connections should have been idle in order to be closed nowtimeUnit- the unit for theidletime
-
closeExpiredConnections
public void closeExpiredConnections()
Deprecated.- Overrides:
closeExpiredConnectionsin classAbstractConnPool
-
shutdown
public void shutdown()
Deprecated.Description copied from class:AbstractConnPoolShuts down this pool and all associated resources. Overriding methods MUST call the implementation here!- Overrides:
shutdownin classAbstractConnPool
-
setMaxTotalConnections
public void setMaxTotalConnections(int max)
Deprecated.since 4.1
-
getMaxTotalConnections
public int getMaxTotalConnections()
Deprecated.since 4.1
-
-