@Contract(threading=SAFE) 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(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(AsynchronousValidationRequest revalidationRequest)
SchedulingStrategyAsynchronousValidationRequest to be executed.schedule in interface SchedulingStrategyrevalidationRequest - the request to be executed; not nullpublic void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 1999–2022 The Apache Software Foundation. All rights reserved.