org.apache.http.impl.client.cache
Class ImmediateSchedulingStrategy
java.lang.Object
org.apache.http.impl.client.cache.ImmediateSchedulingStrategy
- All Implemented Interfaces:
- Closeable, 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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImmediateSchedulingStrategy
public ImmediateSchedulingStrategy(CacheConfig cacheConfig)
- Uses a
ThreadPoolExecutor
which is configured according to the
given CacheConfig
.
- Parameters:
cacheConfig
- specifies thread pool settings. See
CacheConfig.getAsynchronousWorkersMax()
,
CacheConfig.getAsynchronousWorkersCore()
,
CacheConfig.getAsynchronousWorkerIdleLifetimeSecs()
,
and CacheConfig.getRevalidationQueueSize()
.
schedule
public void schedule(AsynchronousValidationRequest revalidationRequest)
- Description copied from interface:
SchedulingStrategy
- Schedule an
AsynchronousValidationRequest
to be executed.
- Specified by:
schedule
in interface SchedulingStrategy
- Parameters:
revalidationRequest
- the request to be executed; not null
close
public void close()
- Specified by:
close
in interface Closeable
Copyright © 2010–2021 The Apache Software Foundation. All rights reserved.