Top Description Fields Constructors Methods
org.apache.hc.client5.http.impl

public final Class IdleConnectionEvictor

extends Object
Class Inheritance
Annotations
@Contract
threading:SAFE_CONDITIONAL
Imports
java.util.concurrent.ThreadFactory, org.apache.hc.core5.annotation.Contract, .ThreadingBehavior, org.apache.hc.core5.concurrent.DefaultThreadFactory, org.apache.hc.core5.pool.ConnPoolControl, org.apache.hc.core5.util.Args, .TimeValue, .Timeout

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

Field Summary

Modifier and TypeField and Description
private final Thread
private final ThreadFactory

Constructor Summary

AccessConstructor and Description
public
IdleConnectionEvictor(final ConnPoolControl<?> connectionManager, final ThreadFactory threadFactory, final TimeValue sleepTime, final TimeValue maxIdleTime)

public
IdleConnectionEvictor(final ConnPoolControl<?> connectionManager, final TimeValue sleepTime, final TimeValue maxIdleTime)

public
IdleConnectionEvictor(final ConnPoolControl<?> connectionManager, final TimeValue maxIdleTime)

Method Summary

Modifier and TypeMethod and Description
public void
awaitTermination(final Timeout timeout)

public boolean
public void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

threadback to summary
private final Thread thread
threadFactoryback to summary
private final ThreadFactory threadFactory

Constructor Detail

IdleConnectionEvictorback to summary
public IdleConnectionEvictor(final ConnPoolControl<?> connectionManager, final ThreadFactory threadFactory, final TimeValue sleepTime, final TimeValue maxIdleTime)
IdleConnectionEvictorback to summary
public IdleConnectionEvictor(final ConnPoolControl<?> connectionManager, final TimeValue sleepTime, final TimeValue maxIdleTime)
IdleConnectionEvictorback to summary
public IdleConnectionEvictor(final ConnPoolControl<?> connectionManager, final TimeValue maxIdleTime)

Method Detail

awaitTerminationback to summary
public void awaitTermination(final Timeout timeout) throws InterruptedException
isRunningback to summary
public boolean isRunning()
shutdownback to summary
public void shutdown()
startback to summary
public void start()