Class SoftCacheStorage

    • Constructor Summary

      Constructors 
      Constructor Description
      SoftCacheStorage()
      Creates an instance that uses a ConcurrentMap internally.
      SoftCacheStorage​(java.util.Map backingMap)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()  
      java.lang.Object get​(java.lang.Object key)  
      int getSize()
      Returns a close approximation of the number of cache entries.
      boolean isConcurrent()
      Returns true if the underlying Map is a ConcurrentMap.
      void put​(java.lang.Object key, java.lang.Object value)  
      void remove​(java.lang.Object key)  
      • Methods inherited from class java.lang.Object

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

      • SoftCacheStorage

        public SoftCacheStorage()
        Creates an instance that uses a ConcurrentMap internally.
      • SoftCacheStorage

        public SoftCacheStorage​(java.util.Map backingMap)
    • Method Detail

      • isConcurrent

        public boolean isConcurrent()
        Returns true if the underlying Map is a ConcurrentMap.
        Specified by:
        isConcurrent in interface ConcurrentCacheStorage
        Returns:
        true if this instance of cache storage is concurrently accessible from multiple threads without synchronization.
      • get

        public java.lang.Object get​(java.lang.Object key)
        Specified by:
        get in interface CacheStorage
      • put

        public void put​(java.lang.Object key,
                        java.lang.Object value)
        Specified by:
        put in interface CacheStorage
      • remove

        public void remove​(java.lang.Object key)
        Specified by:
        remove in interface CacheStorage
      • getSize

        public int getSize()
        Returns a close approximation of the number of cache entries.
        Specified by:
        getSize in interface CacheStorageWithGetSize
        Since:
        2.3.21