Class NullCache<K,​V>

  • All Implemented Interfaces:
    com.google.common.cache.Cache<K,​V>

    public class NullCache<K,​V>
    extends java.lang.Object
    implements com.google.common.cache.Cache<K,​V>
    • Constructor Summary

      Constructors 
      Constructor Description
      NullCache()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.concurrent.ConcurrentMap<K,​V> asMap()  
      void cleanUp()  
      V get​(K key, java.util.concurrent.Callable<? extends V> loader)  
      com.google.common.collect.ImmutableMap<K,​V> getAllPresent​(java.lang.Iterable<?> keys)  
      V getIfPresent​(java.lang.Object key)  
      void invalidate​(java.lang.Object key)  
      void invalidateAll()  
      void invalidateAll​(java.lang.Iterable<?> keys)  
      void put​(K key, V value)  
      void putAll​(java.util.Map<? extends K,​? extends V> m)  
      long size()  
      com.google.common.cache.CacheStats stats()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NullCache

        public NullCache()
    • Method Detail

      • getIfPresent

        public V getIfPresent​(java.lang.Object key)
        Specified by:
        getIfPresent in interface com.google.common.cache.Cache<K,​V>
      • get

        public V get​(K key,
                     java.util.concurrent.Callable<? extends V> loader)
              throws java.util.concurrent.ExecutionException
        Specified by:
        get in interface com.google.common.cache.Cache<K,​V>
        Throws:
        java.util.concurrent.ExecutionException
      • getAllPresent

        public com.google.common.collect.ImmutableMap<K,​V> getAllPresent​(java.lang.Iterable<?> keys)
        Specified by:
        getAllPresent in interface com.google.common.cache.Cache<K,​V>
      • put

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

        public void putAll​(java.util.Map<? extends K,​? extends V> m)
        Specified by:
        putAll in interface com.google.common.cache.Cache<K,​V>
      • invalidate

        public void invalidate​(java.lang.Object key)
        Specified by:
        invalidate in interface com.google.common.cache.Cache<K,​V>
      • invalidateAll

        public void invalidateAll​(java.lang.Iterable<?> keys)
        Specified by:
        invalidateAll in interface com.google.common.cache.Cache<K,​V>
      • invalidateAll

        public void invalidateAll()
        Specified by:
        invalidateAll in interface com.google.common.cache.Cache<K,​V>
      • size

        public long size()
        Specified by:
        size in interface com.google.common.cache.Cache<K,​V>
      • stats

        public com.google.common.cache.CacheStats stats()
        Specified by:
        stats in interface com.google.common.cache.Cache<K,​V>
      • asMap

        public java.util.concurrent.ConcurrentMap<K,​V> asMap()
        Specified by:
        asMap in interface com.google.common.cache.Cache<K,​V>
      • cleanUp

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