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 aThreadPoolExecutor
which is configured according to the givenCacheConfig
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
schedule
(AsynchronousValidationRequest revalidationRequest) Schedule anAsynchronousValidationRequest
to be executed.
-
Constructor Details
-
ImmediateSchedulingStrategy
Uses aThreadPoolExecutor
which 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:SchedulingStrategy
Schedule anAsynchronousValidationRequest
to be executed.- Specified by:
schedule
in interfaceSchedulingStrategy
- Parameters:
revalidationRequest
- the request to be executed; notnull
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-