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 ofCacheMap
doing 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 void
clear()
int
getMaxReachedSize()
The maximum size since initialization/creationint
maxSize()
The maximum allowed size of the mapvoid
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 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:CacheMap
The maximum allowed size of the map
-
getMaxReachedSize
public int getMaxReachedSize()
Description copied from interface:CacheMap
The maximum size since initialization/creation- Specified by:
getMaxReachedSize
in interfaceCacheMap<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 interfaceCacheMap<K,V>
-
-