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:
-
Nested Class Summary
-
Field Summary
Fields inherited from class de.hybris.platform.util.collections.AbstractDelegatingMap
delegateMap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()intThe 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 removedMethods inherited from class de.hybris.platform.util.collections.AbstractDelegatingMap
containsKey, containsValue, createMapInstance, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, toString, valuesMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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 Details
-
AbstractCacheMap
public AbstractCacheMap(int max)
-
-
Method Details
-
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
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>
-