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.
A connection pool that maintains connections by route. This class is derived from MultiThreadedHttpConnectionManager in 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
Note that access to the pool data structures is synchronized via the poolLock in the base class, not via synchronized methods.
Since:
4.0
  • Constructor Details

  • Method Details

    • getConnectionsInPool

      public int getConnectionsInPool(HttpRoute route)
      Deprecated.
    • getConnectionsInPool

      public int getConnectionsInPool()
      Deprecated.
    • requestPoolEntry

      public PoolEntryRequest requestPoolEntry(HttpRoute route, Object state)
      Deprecated.
      Description copied from class: AbstractConnPool
      Returns a new PoolEntryRequest, from which a BasicPoolEntry can be obtained, or the request can be aborted.
      Specified by:
      requestPoolEntry in class AbstractConnPool
      Parameters:
      route - the route
      state - the state
      Returns:
      the entry request
    • freeEntry

      public void freeEntry(BasicPoolEntry entry, boolean reusable, long validDuration, TimeUnit timeUnit)
      Deprecated.
      Description copied from class: AbstractConnPool
      Returns 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:
      freeEntry in class AbstractConnPool
      Parameters:
      entry - the entry for the connection to release
      reusable - 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.
    • deleteClosedConnections

      public void deleteClosedConnections()
      Deprecated.
      Description copied from class: AbstractConnPool
      Deletes all entries for closed connections.
      Specified by:
      deleteClosedConnections in class AbstractConnPool
    • closeIdleConnections

      public void closeIdleConnections(long idletime, TimeUnit timeUnit)
      Deprecated.
      Closes idle connections.
      Overrides:
      closeIdleConnections in class AbstractConnPool
      Parameters:
      idletime - the time the connections should have been idle in order to be closed now
      timeUnit - the unit for the idletime
    • closeExpiredConnections

      public void closeExpiredConnections()
      Deprecated.
      Overrides:
      closeExpiredConnections in class AbstractConnPool
    • shutdown

      public void shutdown()
      Deprecated.
      Description copied from class: AbstractConnPool
      Shuts down this pool and all associated resources. Overriding methods MUST call the implementation here!
      Overrides:
      shutdown in class AbstractConnPool
    • setMaxTotalConnections

      public void setMaxTotalConnections(int max)
      Deprecated.
      since 4.1
    • getMaxTotalConnections

      public int getMaxTotalConnections()
      Deprecated.
      since 4.1