Interface CacheEntryMutator
- All Known Implementing Classes:
AbstractCacheEntryMutator, EmbeddedCacheEntryComputer, EmbeddedCacheEntryMutator, RemoteCacheEntryComputer, RemoteCacheEntryMutator
Updates a cache entry within the cache.
- Author:
- Paul Ferraro
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CacheEntryMutatorTrivialCacheEntryMutatorimplementation that does nothing.static final System.LoggerThe mutator logger -
Method Summary
Modifier and TypeMethodDescriptionstatic CacheEntryMutatorof(Iterable<CacheEntryMutator> mutators) Returns a composite mutator that runs the specified mutators.default voidrun()runAsync()Mutates the associated cache entry asynchronously.withMaxIdle(Supplier<Duration> maxIdle) Applies a maximum idle duration to the mutated cache entry.
-
Field Details
-
LOGGER
The mutator logger -
EMPTY
TrivialCacheEntryMutatorimplementation that does nothing. New cache entries created within the context of a batch, in particular, do not require mutation.
-
-
Method Details
-
run
-
runAsync
CompletionStage<Void> runAsync()Mutates the associated cache entry asynchronously.- Returns:
- a stage that completes when the cache entry mutation completes.
-
withMaxIdle
Applies a maximum idle duration to the mutated cache entry.- Parameters:
maxIdle- a provider of a maximum idle duration- Returns:
- a reference to this mutator.
-
of
Returns a composite mutator that runs the specified mutators.- Parameters:
mutators- a number of mutators- Returns:
- a composite mutator.
-