Interface BiCacheEntryLocator<I,K,V>

Type Parameters:
I - the identifier type of the cache key
K - the key type of the located entry
V - the value type of the located entry
All Superinterfaces:
CacheEntryLocator<I,Map.Entry<K,V>>

public interface BiCacheEntryLocator<I,K,V> extends CacheEntryLocator<I,Map.Entry<K,V>>
Locates a pair of entries from a cache.
Author:
Paul Ferraro
  • Method Details

    • findEntry

      Locates the value in the cache with the specified identifier.
      Parameters:
      id - the cache entry identifier
      Returns:
      the value of the cache entry, or null if not found.
    • tryEntry

      default Map.Entry<CompletionStage<K>,CompletionStage<V>> tryEntry(I id)
      Locates the value in the cache with the specified identifier, if available.
      Parameters:
      id - the cache entry identifier
      Returns:
      the value of the cache entry, or null if not found or is in use.
    • findValueAsync

      default CompletionStage<Map.Entry<K,V>> findValueAsync(I id)
      Description copied from interface: CacheEntryLocator
      Locates the value in the cache with the specified identifier.
      Specified by:
      findValueAsync in interface CacheEntryLocator<I,K>
      Parameters:
      id - the cache entry identifier
      Returns:
      the value of the cache entry, or null if not found.
    • tryValueAsync

      default CompletionStage<Map.Entry<K,V>> tryValueAsync(I id)
      Description copied from interface: CacheEntryLocator
      Returns the value for the specified key, if possible without contention.
      Specified by:
      tryValueAsync in interface CacheEntryLocator<I,K>
      Parameters:
      id - a logical key
      Returns:
      the value of the cache entry, or null if not found or unavailable.