IdleConnectionEvictor (Apache HttpClient 4.5.13 API)
Date: 2020-10-03

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.http.impl.client
Class IdleConnectionEvictor

    java.lang.Object
      org.apache.http.impl.client.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
`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
`void` | `awaitTermination(long time, TimeUnit timeUnit)`
`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 timeUnit)
                          throws InterruptedException

  Throws:
    `InterruptedException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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