Class ImmediateSchedulingStrategy
java.lang.Object
org.apache.http.impl.client.cache.ImmediateSchedulingStrategy
- All Implemented Interfaces:
Closeable,AutoCloseable,SchedulingStrategy
@Contract(threading=SAFE)
public class ImmediateSchedulingStrategy
extends Object
implements SchedulingStrategy
Immediately schedules any incoming validation request. Relies on
CacheConfig to configure the used ThreadPoolExecutor.- Since:
- 4.3
-
Constructor Summary
ConstructorsConstructorDescriptionImmediateSchedulingStrategy(CacheConfig cacheConfig) Uses aThreadPoolExecutorwhich is configured according to the givenCacheConfig. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidschedule(AsynchronousValidationRequest revalidationRequest) Schedule anAsynchronousValidationRequestto be executed.
-
Constructor Details
-
ImmediateSchedulingStrategy
Uses aThreadPoolExecutorwhich is configured according to the givenCacheConfig.- Parameters:
cacheConfig- specifies thread pool settings. SeeCacheConfig.getAsynchronousWorkersMax(),CacheConfig.getAsynchronousWorkersCore(),CacheConfig.getAsynchronousWorkerIdleLifetimeSecs(), andCacheConfig.getRevalidationQueueSize().
-
-
Method Details
-
schedule
Description copied from interface:SchedulingStrategySchedule anAsynchronousValidationRequestto be executed.- Specified by:
schedulein interfaceSchedulingStrategy- Parameters:
revalidationRequest- the request to be executed; notnull
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-