Class DefaultCacheRevalidator
- java.lang.Object
-
- org.apache.hc.client5.http.impl.cache.CacheRevalidatorBase
-
- org.apache.hc.client5.http.impl.cache.DefaultCacheRevalidator
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
class DefaultCacheRevalidator extends CacheRevalidatorBase
Class used for asynchronous revalidations to be used when thestale-while-revalidate
directive is present
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static interface
DefaultCacheRevalidator.RevalidationCall
-
Nested classes/interfaces inherited from class org.apache.hc.client5.http.impl.cache.CacheRevalidatorBase
CacheRevalidatorBase.ScheduledExecutor
-
-
Field Summary
Fields Modifier and Type Field Description private static org.slf4j.Logger
LOG
-
Constructor Summary
Constructors Constructor Description DefaultCacheRevalidator(java.util.concurrent.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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
revalidateCacheEntry(java.lang.String cacheKey, DefaultCacheRevalidator.RevalidationCall call)
Schedules an asynchronous re-validation-
Methods inherited from class org.apache.hc.client5.http.impl.cache.CacheRevalidatorBase
awaitTermination, close, getScheduledIdentifiers, isStale, jobFailed, jobSuccessful, scheduleRevalidation, wrap
-
-
-
-
Constructor Detail
-
DefaultCacheRevalidator
public DefaultCacheRevalidator(CacheRevalidatorBase.ScheduledExecutor scheduledExecutor, SchedulingStrategy schedulingStrategy)
Create DefaultCacheRevalidator which will make ache revalidation requests using the suppliedSchedulingStrategy
andCacheRevalidatorBase.ScheduledExecutor
.
-
DefaultCacheRevalidator
public DefaultCacheRevalidator(java.util.concurrent.ScheduledExecutorService scheduledThreadPoolExecutor, SchedulingStrategy schedulingStrategy)
Create CacheValidator which will make ache revalidation requests using the suppliedSchedulingStrategy
andScheduledExecutorService
.
-
-
Method Detail
-
revalidateCacheEntry
public void revalidateCacheEntry(java.lang.String cacheKey, DefaultCacheRevalidator.RevalidationCall call)
Schedules an asynchronous re-validation
-
-