Class CaffeinatedGuavaLoadingCache<K,​V>

  • All Implemented Interfaces:
    com.google.common.base.Function<K,​V>, com.google.common.cache.Cache<K,​V>, com.google.common.cache.LoadingCache<K,​V>, java.io.Serializable, java.util.function.Function<K,​V>

    final class CaffeinatedGuavaLoadingCache<K,​V>
    extends CaffeinatedGuavaCache<K,​V>
    implements com.google.common.cache.LoadingCache<K,​V>
    A Caffeine-backed loading cache through a Guava facade.
    • Field Detail

      • nullBulkLoad

        static final java.lang.ThreadLocal<java.lang.Boolean> nullBulkLoad
    • Constructor Detail

      • CaffeinatedGuavaLoadingCache

        CaffeinatedGuavaLoadingCache​(LoadingCache<K,​V> cache)
    • Method Detail

      • get

        public V get​(K key)
              throws java.util.concurrent.ExecutionException
        Specified by:
        get in interface com.google.common.cache.LoadingCache<K,​V>
        Throws:
        java.util.concurrent.ExecutionException
      • getUnchecked

        public V getUnchecked​(K key)
        Specified by:
        getUnchecked in interface com.google.common.cache.LoadingCache<K,​V>
      • getAll

        public com.google.common.collect.ImmutableMap<K,​V> getAll​(java.lang.Iterable<? extends K> keys)
                                                                 throws java.util.concurrent.ExecutionException
        Specified by:
        getAll in interface com.google.common.cache.LoadingCache<K,​V>
        Throws:
        java.util.concurrent.ExecutionException
      • apply

        public V apply​(@NonNull K key)
        Specified by:
        apply in interface com.google.common.base.Function<K,​V>
        Specified by:
        apply in interface java.util.function.Function<K,​V>
        Specified by:
        apply in interface com.google.common.cache.LoadingCache<K,​V>
      • refresh

        public void refresh​(K key)
        Specified by:
        refresh in interface com.google.common.cache.LoadingCache<K,​V>