Class ImmediateSchedulingStrategy
- java.lang.Object
 - 
- org.apache.http.impl.client.cache.ImmediateSchedulingStrategy
 
 
- 
- All Implemented Interfaces:
 java.io.Closeable,java.lang.AutoCloseable,SchedulingStrategy
@Contract(threading=SAFE) public class ImmediateSchedulingStrategy extends java.lang.Object implements SchedulingStrategy
Immediately schedules any incoming validation request. Relies onCacheConfigto configure the usedThreadPoolExecutor.- Since:
 - 4.3
 
 
- 
- 
Constructor Summary
Constructors Constructor Description ImmediateSchedulingStrategy(CacheConfig cacheConfig)Uses aThreadPoolExecutorwhich is configured according to the givenCacheConfig. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidschedule(AsynchronousValidationRequest revalidationRequest)Schedule anAsynchronousValidationRequestto be executed. 
 - 
 
- 
- 
Constructor Detail
- 
ImmediateSchedulingStrategy
public ImmediateSchedulingStrategy(CacheConfig cacheConfig)
Uses aThreadPoolExecutorwhich is configured according to the givenCacheConfig.- Parameters:
 cacheConfig- specifies thread pool settings. SeeCacheConfig.getAsynchronousWorkersMax(),CacheConfig.getAsynchronousWorkersCore(),CacheConfig.getAsynchronousWorkerIdleLifetimeSecs(), andCacheConfig.getRevalidationQueueSize().
 
 - 
 
- 
Method Detail
- 
schedule
public void schedule(AsynchronousValidationRequest revalidationRequest)
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 interfacejava.lang.AutoCloseable- Specified by:
 closein interfacejava.io.Closeable
 
 - 
 
 -