Class DefaultAsyncCacheRevalidator
- java.lang.Object
-
- org.apache.hc.client5.http.impl.cache.CacheRevalidatorBase
-
- org.apache.hc.client5.http.impl.cache.DefaultAsyncCacheRevalidator
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
class DefaultAsyncCacheRevalidator 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 classDefaultAsyncCacheRevalidator.InternalScheduledExecutor(package private) static interfaceDefaultAsyncCacheRevalidator.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 DefaultAsyncCacheRevalidator(java.util.concurrent.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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrevalidateCacheEntry(java.lang.String cacheKey, AsyncExecCallback asyncExecCallback, DefaultAsyncCacheRevalidator.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
-
DefaultAsyncCacheRevalidator
public DefaultAsyncCacheRevalidator(CacheRevalidatorBase.ScheduledExecutor scheduledExecutor, SchedulingStrategy schedulingStrategy)
Create DefaultCacheRevalidator which will make ache revalidation requests using the suppliedSchedulingStrategyandCacheRevalidatorBase.ScheduledExecutor.
-
DefaultAsyncCacheRevalidator
public DefaultAsyncCacheRevalidator(java.util.concurrent.ScheduledExecutorService executorService, SchedulingStrategy schedulingStrategy)Create CacheValidator which will make ache revalidation requests using the suppliedSchedulingStrategyandScheduledExecutorService.
-
-
Method Detail
-
revalidateCacheEntry
public void revalidateCacheEntry(java.lang.String cacheKey, AsyncExecCallback asyncExecCallback, DefaultAsyncCacheRevalidator.RevalidationCall call)Schedules an asynchronous re-validation
-
-