org.apache.hc.client5.http.impl.sync

## Class IdleConnectionEvictor

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

    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(HttpClientConnectionManager connectionManager, long maxIdleTime, TimeUnit maxIdleTimeUnit)`
`IdleConnectionEvictor(HttpClientConnectionManager connectionManager, long sleepTime, TimeUnit sleepTimeUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)`
`IdleConnectionEvictor(HttpClientConnectionManager connectionManager, ThreadFactory threadFactory, long sleepTime, TimeUnit sleepTimeUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)`

### Method Summary

Methods
`void` `awaitTermination(long time, TimeUnit tunit)`
`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(HttpClientConnectionManager connectionManager,
                         ThreadFactory threadFactory,
                         long sleepTime,
                         TimeUnit sleepTimeUnit,
                         long maxIdleTime,
                         TimeUnit maxIdleTimeUnit)

#### IdleConnectionEvictor

    public IdleConnectionEvictor(HttpClientConnectionManager connectionManager,
                         long sleepTime,
                         TimeUnit sleepTimeUnit,
                         long maxIdleTime,
                         TimeUnit maxIdleTimeUnit)

#### IdleConnectionEvictor

    public IdleConnectionEvictor(HttpClientConnectionManager connectionManager,
                         long maxIdleTime,
                         TimeUnit maxIdleTimeUnit)

### Method Detail

#### start

    public void start()

#### shutdown

    public void shutdown()

#### isRunning

    public boolean isRunning()

#### awaitTermination

    public void awaitTermination(long time,
                        TimeUnit tunit)
                          throws InterruptedException

Throws:
  `InterruptedException`