Class CacheLoader.SupplierToCacheLoader<V>

  • All Implemented Interfaces:
    java.io.Serializable
    Enclosing class:
    CacheLoader<K,​V>

    private static final class CacheLoader.SupplierToCacheLoader<V>
    extends CacheLoader<java.lang.Object,​V>
    implements java.io.Serializable
    • Field Detail

      • computingSupplier

        private final Supplier<V> computingSupplier
    • Constructor Detail

      • SupplierToCacheLoader

        public SupplierToCacheLoader​(Supplier<V> computingSupplier)
    • Method Detail

      • load

        public V load​(java.lang.Object key)
        Description copied from class: CacheLoader
        Computes or retrieves the value corresponding to key.
        Specified by:
        load in class CacheLoader<java.lang.Object,​V>
        Parameters:
        key - the non-null key whose value should be loaded
        Returns:
        the value associated with key; must not be null