@ThreadSafe public class ImmediateSchedulingStrategy extends java.lang.Object implements SchedulingStrategy
CacheConfig to configure the used ThreadPoolExecutor.| Constructor and Description |
|---|
ImmediateSchedulingStrategy(CacheConfig cacheConfig)
Uses a
ThreadPoolExecutor which is configured according to the
given CacheConfig. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
schedule(cz.msebera.android.httpclient.impl.client.cache.AsynchronousValidationRequest revalidationRequest)
Schedule an
AsynchronousValidationRequest to be executed. |
public ImmediateSchedulingStrategy(CacheConfig cacheConfig)
ThreadPoolExecutor which is configured according to the
given CacheConfig.cacheConfig - specifies thread pool settings. See
CacheConfig.getAsynchronousWorkersMax(),
CacheConfig.getAsynchronousWorkersCore(),
CacheConfig.getAsynchronousWorkerIdleLifetimeSecs(),
and CacheConfig.getRevalidationQueueSize().public void schedule(cz.msebera.android.httpclient.impl.client.cache.AsynchronousValidationRequest revalidationRequest)
SchedulingStrategyAsynchronousValidationRequest to be executed.schedule in interface SchedulingStrategyrevalidationRequest - the request to be executed; not nullpublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseable