Class 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
    • Method Detail

      • getConnectionsInPool

        public int getConnectionsInPool​(HttpRoute route)
        Deprecated.
      • getConnectionsInPool

        public int getConnectionsInPool()
        Deprecated.
      • freeEntry

        public void freeEntry​(BasicPoolEntry entry,
                              boolean reusable,
                              long validDuration,
                              java.util.concurrent.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.
      • closeIdleConnections

        public void closeIdleConnections​(long idletime,
                                         java.util.concurrent.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
      • 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