Interface Locator<K,V>


public interface Locator<K,V>
Locates a value from the cache.
Author:
Paul Ferraro
  • Method Summary

    Modifier and Type
    Method
    Description
    Locates the value in the cache with the specified identifier.
    default V
    tryValue(K key)
    Returns the value for the specified key, if possible.
  • Method Details

    • findValue

      V findValue(K id)
      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.
    • tryValue

      default V tryValue(K key)
      Returns the value for the specified key, if possible.
      Parameters:
      key - a cache key
      Returns:
      the value of the cache entry, or null if not found or unavailable.