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 interfaceNested 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 suppliedSchedulingStrategyandScheduledExecutorService.DefaultAsyncCacheRevalidator(CacheRevalidatorBase.ScheduledExecutor scheduledExecutor, SchedulingStrategy schedulingStrategy) Create DefaultCacheRevalidator which will make ache revalidation requests using the suppliedSchedulingStrategyandCacheRevalidatorBase.ScheduledExecutor. -
Method Summary
Modifier and TypeMethodDescriptionvoidrevalidateCacheEntry(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 suppliedSchedulingStrategyandCacheRevalidatorBase.ScheduledExecutor. -
DefaultAsyncCacheRevalidator
public DefaultAsyncCacheRevalidator(ScheduledExecutorService executorService, SchedulingStrategy schedulingStrategy) Create CacheValidator which will make ache revalidation requests using the suppliedSchedulingStrategyandScheduledExecutorService.
-
-
Method Details
-
revalidateCacheEntry
public void revalidateCacheEntry(String cacheKey, AsyncExecCallback asyncExecCallback, DefaultAsyncCacheRevalidator.RevalidationCall call) Schedules an asynchronous re-validation
-