Class SimpleLoadingCache<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>, Function<K,​V>

    public class SimpleLoadingCache<K,​V>
    extends com.google.common.cache.AbstractLoadingCache<K,​V>
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.google.common.cache.AbstractCache

        com.google.common.cache.AbstractCache.SimpleStatsCounter, com.google.common.cache.AbstractCache.StatsCounter
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      V get​(Object key)  
      V get​(K key, Callable<? extends V> callable)  
      V getIfPresent​(Object key)  
      void invalidate​(Object key)  
      static <K,​V>
      SimpleLoadingCache<K,​V>
      newInstance​(com.google.common.cache.CacheLoader<K,​V> cacheLoader)  
      void put​(K key, V value)  
      • Methods inherited from class com.google.common.cache.AbstractLoadingCache

        apply, getAll, getUnchecked, refresh
      • Methods inherited from class com.google.common.cache.AbstractCache

        asMap, cleanUp, getAllPresent, invalidateAll, invalidateAll, putAll, size, stats
      • Methods inherited from interface com.google.common.cache.Cache

        cleanUp, getAllPresent, invalidateAll, invalidateAll, putAll, size, stats
      • Methods inherited from interface com.google.common.base.Function

        equals
      • Methods inherited from interface com.google.common.cache.LoadingCache

        asMap
    • Method Detail

      • get

        public V get​(K key,
                     Callable<? extends V> callable)
              throws ExecutionException
        Specified by:
        get in interface com.google.common.cache.Cache<K,​V>
        Overrides:
        get in class com.google.common.cache.AbstractCache<K,​V>
        Throws:
        ExecutionException
      • getIfPresent

        public V getIfPresent​(Object key)
      • invalidate

        public void invalidate​(Object key)
        Specified by:
        invalidate in interface com.google.common.cache.Cache<K,​V>
        Overrides:
        invalidate in class com.google.common.cache.AbstractCache<K,​V>
      • put

        public void put​(K key,
                        V value)
        Specified by:
        put in interface com.google.common.cache.Cache<K,​V>
        Overrides:
        put in class com.google.common.cache.AbstractCache<K,​V>
      • newInstance

        public static <K,​V> SimpleLoadingCache<K,​V> newInstance​(com.google.common.cache.CacheLoader<K,​V> cacheLoader)