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-revalidatedirective is present
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static interfaceDefaultCacheRevalidator.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.LoggerLOG
-
Constructor Summary
Constructors Constructor Description DefaultCacheRevalidator(java.util.concurrent.ScheduledExecutorService scheduledThreadPoolExecutor, SchedulingStrategy schedulingStrategy)Create CacheValidator which will make ache revalidation requests using the suppliedSchedulingStrategyandScheduledExecutorService.DefaultCacheRevalidator(CacheRevalidatorBase.ScheduledExecutor scheduledExecutor, SchedulingStrategy schedulingStrategy)Create DefaultCacheRevalidator which will make ache revalidation requests using the suppliedSchedulingStrategyandCacheRevalidatorBase.ScheduledExecutor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrevalidateCacheEntry(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 suppliedSchedulingStrategyandCacheRevalidatorBase.ScheduledExecutor.
-
DefaultCacheRevalidator
public DefaultCacheRevalidator(java.util.concurrent.ScheduledExecutorService scheduledThreadPoolExecutor, SchedulingStrategy schedulingStrategy)Create CacheValidator which will make ache revalidation requests using the suppliedSchedulingStrategyandScheduledExecutorService.
-
-
Method Detail
-
revalidateCacheEntry
public void revalidateCacheEntry(java.lang.String cacheKey, DefaultCacheRevalidator.RevalidationCall call)Schedules an asynchronous re-validation
-
-