Interface CacheLoader<K,V>

Type Parameters:
K - Type of entry.
V - Type of value.

public interface CacheLoader<K,V>
Cache loader: the role of a loader is to compute the value to store in a cache.
  • Method Summary

    Modifier and Type
    Method
    Description
    load(K key)
    Compute value to store in a cache.
  • Method Details

    • load

      V load(K key) throws Exception
      Compute value to store in a cache. Implementations should not allow null values.
      Parameters:
      key - Cache entry.
      Returns:
      Cache value.
      Throws:
      Exception - If an error occurred during computation.