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>,java.io.Serializable,java.util.Map<K,V>
- Direct Known Subclasses:
AbstractBaseCacheMap
public abstract class AbstractCacheMap<K,V> extends AbstractDelegatingMap<K,V> implements CacheMap<K,V>
Default implementation ofCacheMapdoing nothing.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.util.collections.AbstractDelegatingMap
delegateMap
-
-
Constructor Summary
Constructors Constructor Description AbstractCacheMap(int max)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()intgetMaxReachedSize()The maximum size since initialization/creationintmaxSize()The maximum allowed size of the mapvoidprocessDisplacedEntry(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 de.hybris.platform.util.collections.AbstractDelegatingMap
containsKey, containsValue, createMapInstance, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, toString, values
-
-
-
-
Method Detail
-
clear
public void clear()
-
maxSize
public int maxSize()
Description copied from interface:CacheMapThe maximum allowed size of the map
-
getMaxReachedSize
public int getMaxReachedSize()
Description copied from interface:CacheMapThe maximum size since initialization/creation- Specified by:
getMaxReachedSizein interfaceCacheMap<K,V>- Returns:
- the maximum size since initialization
-
processDisplacedEntry
public void processDisplacedEntry(K key, V value)
Description copied from interface:CacheMapdo 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:
processDisplacedEntryin interfaceCacheMap<K,V>
-
-