org.apache.solr.update

## Class UpdateShardHandler.IdleConnectionsEvictor

- java.lang.Object
- - org.apache.solr.update.UpdateShardHandler.IdleConnectionsEvictor

- Enclosing class:
    UpdateShardHandler

      public static final class UpdateShardHandler.IdleConnectionsEvictor
      extends Object

  This class is adapted from org.apache.http.impl.client.IdleConnectionEvictor and changed to use the deprecated ClientConnectionManager instead of the new HttpClientConnectionManager.

  This class maintains a background thread to enforce an eviction policy for expired / idle persistent connections kept alive in the connection pool.

  See SOLR-9290 for related discussion.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `IdleConnectionsEvictor(org.apache.http.conn.ClientConnectionManager connectionManager, long sleepTime, TimeUnit sleepTimeUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)`
    `IdleConnectionsEvictor(org.apache.http.conn.ClientConnectionManager connectionManager, ThreadFactory threadFactory, long sleepTime, TimeUnit sleepTimeUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)`

  - ### Method Summary

    All Methods Instance Methods Concrete 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`

- - ### Constructor Detail

    - #### IdleConnectionsEvictor

          public IdleConnectionsEvictor(org.apache.http.conn.ClientConnectionManager connectionManager,
                                        ThreadFactory threadFactory,
                                        long sleepTime,
                                        TimeUnit sleepTimeUnit,
                                        long maxIdleTime,
                                        TimeUnit maxIdleTimeUnit)

    - #### IdleConnectionsEvictor

          public IdleConnectionsEvictor(org.apache.http.conn.ClientConnectionManager connectionManager,
                                        long sleepTime,
                                        TimeUnit sleepTimeUnit,
                                        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`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.