Class IdleConnectionEvictor


  • public final class IdleConnectionEvictor
    extends java.lang.Object
    This class maintains a background thread to enforce an eviction policy for expired / idle persistent connections kept alive in the connection pool.
    Since:
    4.4
    • Constructor Detail

      • IdleConnectionEvictor

        public IdleConnectionEvictor​(HttpClientConnectionManager connectionManager,
                                     java.util.concurrent.ThreadFactory threadFactory,
                                     long sleepTime,
                                     java.util.concurrent.TimeUnit sleepTimeUnit,
                                     long maxIdleTime,
                                     java.util.concurrent.TimeUnit maxIdleTimeUnit)
      • IdleConnectionEvictor

        public IdleConnectionEvictor​(HttpClientConnectionManager connectionManager,
                                     long sleepTime,
                                     java.util.concurrent.TimeUnit sleepTimeUnit,
                                     long maxIdleTime,
                                     java.util.concurrent.TimeUnit maxIdleTimeUnit)
      • IdleConnectionEvictor

        public IdleConnectionEvictor​(HttpClientConnectionManager connectionManager,
                                     long maxIdleTime,
                                     java.util.concurrent.TimeUnit maxIdleTimeUnit)
    • Method Detail

      • start

        public void start()
      • shutdown

        public void shutdown()
      • isRunning

        public boolean isRunning()
      • awaitTermination

        public void awaitTermination​(long time,
                                     java.util.concurrent.TimeUnit timeUnit)
                              throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException