Interface CacheLoader<K,V>

Type Parameters:
K - the type of keys
V - the type of values
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface CacheLoader<K,V>
Computes or retrieves values, based on a key, for use in populating an AxelorCache.

Warning: loading must not attempt to update any mappings of the cache directly.

  • Method Summary

    Modifier and Type
    Method
    Description
    load(K key)
    Computes or retrieves the value corresponding to key.
  • Method Details

    • load

      @Nullable V load(K key)
      Computes or retrieves the value corresponding to key.
      Parameters:
      key - the non-null key whose value should be loaded
      Returns:
      the value associated with key or null if not found