org.apache.hc.client5.http.impl

## Class IdleConnectionEvictor

- java.lang.Object
- - org.apache.hc.client5.http.impl.IdleConnectionEvictor

-     @Contract(threading=SAFE_CONDITIONAL)
      public final class IdleConnectionEvictor
      extends 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 Summary

    Constructors
    Constructor and Description
    `IdleConnectionEvictor(ConnPoolControl<?> connectionManager, ThreadFactory threadFactory, TimeValue sleepTime, TimeValue maxIdleTime)`
    `IdleConnectionEvictor(ConnPoolControl<?> connectionManager, TimeValue maxIdleTime)`
    `IdleConnectionEvictor(ConnPoolControl<?> connectionManager, TimeValue sleepTime, TimeValue maxIdleTime)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `awaitTermination(Timeout timeout)`
    `boolean` | `isRunning()`
    `void` | `shutdown()`
    `void` | `start()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### IdleConnectionEvictor

          public IdleConnectionEvictor(ConnPoolControl<?> connectionManager,
                                       ThreadFactory threadFactory,
                                       TimeValue sleepTime,
                                       TimeValue maxIdleTime)

    - #### IdleConnectionEvictor

          public IdleConnectionEvictor(ConnPoolControl<?> connectionManager,
                                       TimeValue sleepTime,
                                       TimeValue maxIdleTime)

    - #### IdleConnectionEvictor

          public IdleConnectionEvictor(ConnPoolControl<?> connectionManager,
                                       TimeValue maxIdleTime)

  - ### Method Detail

    - #### start

          public void start()

    - #### shutdown

          public void shutdown()

    - #### isRunning

          public boolean isRunning()

    - #### awaitTermination

          public void awaitTermination(Timeout timeout)
                                throws InterruptedException

      Throws:
        `InterruptedException`

Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.