Interface AsyncClaimingCache<K,V>

Type Parameters:
K -
V -
All Known Implementing Classes:
AsyncClaimingCache3Impl, AsyncClaimingCacheImpl, AsyncClaimingCacheWithTransformValue

public interface AsyncClaimingCache<K,V>
Interface for an async cache that allows "claiming" (= making explicit references) to entries. As long as an entry is claimed it will not be evicted.
Author:
raven
  • Method Details

    • claim

      RefFuture<V> claim(K key)
      Claim a reference to the key's entry.
      Parameters:
      key -
      Returns:
      Throws:
      ExecutionException
    • claimIfPresent

      RefFuture<V> claimIfPresent(K key)
      Cannot raise an ExecutionException because it does not trigger loading
    • addEvictionGuard

      Disposable addEvictionGuard(Predicate<? super K> predicate)
      Protect eviction of certain keys as long as the guard is not disposed. Disposable may immediately evict all no longer guarded items
    • invalidateAll

      void invalidateAll()