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-revalidate
directive is present
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
DefaultAsyncCacheRevalidator.InternalScheduledExecutor
(package private) static interface
DefaultAsyncCacheRevalidator.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 DefaultAsyncCacheRevalidator(java.util.concurrent.ScheduledExecutorService executorService, SchedulingStrategy schedulingStrategy)
Create CacheValidator which will make ache revalidation requests using the suppliedSchedulingStrategy
andScheduledExecutorService
.DefaultAsyncCacheRevalidator(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, 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 suppliedSchedulingStrategy
andCacheRevalidatorBase.ScheduledExecutor
.
-
DefaultAsyncCacheRevalidator
public DefaultAsyncCacheRevalidator(java.util.concurrent.ScheduledExecutorService executorService, SchedulingStrategy schedulingStrategy)
Create CacheValidator which will make ache revalidation requests using the suppliedSchedulingStrategy
andScheduledExecutorService
.
-
-
Method Detail
-
revalidateCacheEntry
public void revalidateCacheEntry(java.lang.String cacheKey, AsyncExecCallback asyncExecCallback, DefaultAsyncCacheRevalidator.RevalidationCall call)
Schedules an asynchronous re-validation
-
-