Class DefaultAsyncCacheRevalidator
java.lang.Object
org.apache.hc.client5.http.impl.cache.CacheRevalidatorBase
org.apache.hc.client5.http.impl.cache.DefaultAsyncCacheRevalidator
- All Implemented Interfaces:
Closeable
,AutoCloseable
Class used for asynchronous revalidations to be used when the
stale-while-revalidate
directive is present-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
(package private) static interface
Nested classes/interfaces inherited from class org.apache.hc.client5.http.impl.cache.CacheRevalidatorBase
CacheRevalidatorBase.ScheduledExecutor
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultAsyncCacheRevalidator
(ScheduledExecutorService executorService, SchedulingStrategy schedulingStrategy) Create CacheValidator which will make ache revalidation requests using the suppliedSchedulingStrategy
andScheduledExecutorService
.DefaultAsyncCacheRevalidator
(CacheRevalidatorBase.ScheduledExecutor scheduledExecutor, SchedulingStrategy schedulingStrategy) Create DefaultCacheRevalidator which will make ache revalidation requests using the suppliedSchedulingStrategy
andCacheRevalidatorBase.ScheduledExecutor
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
revalidateCacheEntry
(String cacheKey, AsyncExecCallback asyncExecCallback, DefaultAsyncCacheRevalidator.RevalidationCall call) Schedules an asynchronous re-validationMethods inherited from class org.apache.hc.client5.http.impl.cache.CacheRevalidatorBase
awaitTermination, close, getScheduledIdentifiers, isStale, jobFailed, jobSuccessful, scheduleRevalidation, wrap
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG
-
-
Constructor Details
-
DefaultAsyncCacheRevalidator
public DefaultAsyncCacheRevalidator(CacheRevalidatorBase.ScheduledExecutor scheduledExecutor, SchedulingStrategy schedulingStrategy) Create DefaultCacheRevalidator which will make ache revalidation requests using the suppliedSchedulingStrategy
andCacheRevalidatorBase.ScheduledExecutor
. -
DefaultAsyncCacheRevalidator
public DefaultAsyncCacheRevalidator(ScheduledExecutorService executorService, SchedulingStrategy schedulingStrategy) Create CacheValidator which will make ache revalidation requests using the suppliedSchedulingStrategy
andScheduledExecutorService
.
-
-
Method Details
-
revalidateCacheEntry
public void revalidateCacheEntry(String cacheKey, AsyncExecCallback asyncExecCallback, DefaultAsyncCacheRevalidator.RevalidationCall call) Schedules an asynchronous re-validation
-