org.apache.http.impl.client

## Class IdleConnectionEvictor

- java.lang.Object
- - org.apache.http.impl.client.IdleConnectionEvictor

-     public final class IdleConnectionEvictor
      extends Object

  此类维护一个后台线程，以强制执行在连接池中保持活动的过期/空闲持久连接的逐出策略。
  从以下版本开始：
    4.4

- - ### 构造方法摘要

    构造方法
    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)`

  - ### 方法摘要

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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`

- - ### 构造方法详细信息

    - #### 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)

  - ### 方法详细信息

    - #### start

          public void start()

    - #### shutdown

          public void shutdown()

    - #### isRunning

          public boolean isRunning()

    - #### awaitTermination

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

      异常
        `InterruptedException`

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

本帮助文档是使用 《谷歌翻译》翻译，请与英文版配合使用 by--QQ:654638585