Class AbstractCacheMap<K,​V>

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractCacheMap​(int max)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()  
      int getMaxReachedSize()
      The maximum size since initialization/creation
      int maxSize()
      The maximum allowed size of the map
      void processDisplacedEntry​(K key, V value)
      do something before a entry is displaced because the map is growing to big (if an entry is added and size() is getting bigger as maxSize()), this method will be called before an old entry is being removed
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface de.hybris.platform.util.collections.CacheMap

        size
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, values
    • Constructor Detail

      • AbstractCacheMap

        public AbstractCacheMap​(int max)
    • Method Detail

      • maxSize

        public int maxSize()
        Description copied from interface: CacheMap
        The maximum allowed size of the map
        Specified by:
        maxSize in interface CacheMap<K,​V>
      • getMaxReachedSize

        public int getMaxReachedSize()
        Description copied from interface: CacheMap
        The maximum size since initialization/creation
        Specified by:
        getMaxReachedSize in interface CacheMap<K,​V>
        Returns:
        the maximum size since initialization
      • processDisplacedEntry

        public void processDisplacedEntry​(K key,
                                          V value)
        Description copied from interface: CacheMap
        do something before a entry is displaced because the map is growing to big (if an entry is added and size() is getting bigger as maxSize()), this method will be called before an old entry is being removed
        Specified by:
        processDisplacedEntry in interface CacheMap<K,​V>