Interface CacheEntryMutator

All Superinterfaces:
Runnable, Runner
All Known Implementing Classes:
AbstractCacheEntryMutator, EmbeddedCacheEntryComputer, EmbeddedCacheEntryMutator, RemoteCacheEntryComputer, RemoteCacheEntryMutator

public interface CacheEntryMutator extends Runner
Updates a cache entry within the cache.
Author:
Paul Ferraro
  • Field Details

    • LOGGER

      static final System.Logger LOGGER
      The mutator logger
    • EMPTY

      static final CacheEntryMutator EMPTY
      Trivial CacheEntryMutator implementation that does nothing. New cache entries created within the context of a batch, in particular, do not require mutation.
  • Method Details

    • run

      default void run()
      Specified by:
      run in interface Runnable
    • runAsync

      CompletionStage<Void> runAsync()
      Mutates the associated cache entry asynchronously.
      Returns:
      a stage that completes when the cache entry mutation completes.
    • withMaxIdle

      CacheEntryMutator withMaxIdle(Supplier<Duration> maxIdle)
      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.