Class AbstractCacheMap<K,V>

java.lang.Object
de.hybris.platform.util.collections.AbstractDelegatingMap<K,V>
de.hybris.platform.util.collections.AbstractCacheMap<K,V>
All Implemented Interfaces:
CacheMap<K,V>, Serializable, Map<K,V>
Direct Known Subclasses:
AbstractBaseCacheMap

public abstract class AbstractCacheMap<K,V> extends AbstractDelegatingMap<K,V> implements CacheMap<K,V>
Default implementation of CacheMap doing nothing.
See Also:
  • Constructor Details

    • AbstractCacheMap

      public AbstractCacheMap(int max)
  • Method Details

    • clear

      public void clear()
      Specified by:
      clear in interface CacheMap<K,V>
      Specified by:
      clear in interface Map<K,V>
      Overrides:
      clear in class AbstractDelegatingMap<K,V>
    • 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>