Class DefaultCacheRevalidator
java.lang.Object
org.apache.hc.client5.http.impl.cache.CacheRevalidatorBase
org.apache.hc.client5.http.impl.cache.DefaultCacheRevalidator
- 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 interface
Nested classes/interfaces inherited from class org.apache.hc.client5.http.impl.cache.CacheRevalidatorBase
CacheRevalidatorBase.ScheduledExecutor
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultCacheRevalidator
(ScheduledExecutorService scheduledThreadPoolExecutor, SchedulingStrategy schedulingStrategy) Create CacheValidator which will make ache revalidation requests using the suppliedSchedulingStrategy
andScheduledExecutorService
.DefaultCacheRevalidator
(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, DefaultCacheRevalidator.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
-
DefaultCacheRevalidator
public DefaultCacheRevalidator(CacheRevalidatorBase.ScheduledExecutor scheduledExecutor, SchedulingStrategy schedulingStrategy) Create DefaultCacheRevalidator which will make ache revalidation requests using the suppliedSchedulingStrategy
andCacheRevalidatorBase.ScheduledExecutor
. -
DefaultCacheRevalidator
public DefaultCacheRevalidator(ScheduledExecutorService scheduledThreadPoolExecutor, SchedulingStrategy schedulingStrategy) Create CacheValidator which will make ache revalidation requests using the suppliedSchedulingStrategy
andScheduledExecutorService
.
-
-
Method Details
-
revalidateCacheEntry
Schedules an asynchronous re-validation
-