Interface MRUCache.RetrievalCallback<K,V>

Enclosing class:
MRUCache<K,V>

public static interface MRUCache.RetrievalCallback<K,V>
The callback interface. Caches should provide one of these classes to perform any time-consuming tasks required to generate values in this cache. If the time taken to generate a value isn't time-consuming, then perhaps you shouldn't be using a cache to store them.
  • Method Summary

    Modifier and Type
    Method
    Description
    get(K key)
    Dynamically generates the value of an entity in a cache
  • Method Details

    • get

      V get(K key)
      Dynamically generates the value of an entity in a cache
      Parameters:
      key - The key used to reference the cached object
      Returns:
      The newly generated (or updated) cached object