@ThreadSafe public class ImmediateSchedulingStrategy extends 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(org.apache.http.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(org.apache.http.impl.client.cache.AsynchronousValidationRequest revalidationRequest)
SchedulingStrategy
AsynchronousValidationRequest
to be executed.schedule
in interface SchedulingStrategy
revalidationRequest
- the request to be executed; not null
public void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 1999–2013 The Apache Software Foundation. All rights reserved.