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(org.apache.hc.core5.pool.ConnPoolControl<?> connectionManager, ThreadFactory threadFactory, org.apache.hc.core5.util.TimeValue sleepTime, org.apache.hc.core5.util.TimeValue maxIdleTime)`
    `IdleConnectionEvictor(org.apache.hc.core5.pool.ConnPoolControl<?> connectionManager, org.apache.hc.core5.util.TimeValue maxIdleTime)`
    `IdleConnectionEvictor(org.apache.hc.core5.pool.ConnPoolControl<?> connectionManager, org.apache.hc.core5.util.TimeValue sleepTime, org.apache.hc.core5.util.TimeValue maxIdleTime)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `awaitTermination(org.apache.hc.core5.util.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(org.apache.hc.core5.pool.ConnPoolControl<?> connectionManager,
                                       ThreadFactory threadFactory,
                                       org.apache.hc.core5.util.TimeValue sleepTime,
                                       org.apache.hc.core5.util.TimeValue maxIdleTime)

    - #### IdleConnectionEvictor

          public IdleConnectionEvictor(org.apache.hc.core5.pool.ConnPoolControl<?> connectionManager,
                                       org.apache.hc.core5.util.TimeValue sleepTime,
                                       org.apache.hc.core5.util.TimeValue maxIdleTime)

    - #### IdleConnectionEvictor

          public IdleConnectionEvictor(org.apache.hc.core5.pool.ConnPoolControl<?> connectionManager,
                                       org.apache.hc.core5.util.TimeValue maxIdleTime)

  - ### Method Detail

    - #### start

          public void start()

    - #### shutdown

          public void shutdown()

    - #### isRunning

          public boolean isRunning()

    - #### awaitTermination

          public void awaitTermination(org.apache.hc.core5.util.Timeout timeout)
                                throws InterruptedException

      Throws:
        `InterruptedException`

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