Class YFastFIFOMap<K,V>
- java.lang.Object
-
- de.hybris.platform.util.collections.AbstractDelegatingMap<K,V>
-
- de.hybris.platform.util.collections.YFastMap<K,V>
-
- de.hybris.platform.util.collections.YFastFIFOMap<K,V>
-
- All Implemented Interfaces:
CacheMap<K,V>,YFIFOMap<K,V>,YMap<K,V>,java.io.Serializable,java.util.Map<K,V>
- Direct Known Subclasses:
BaseCacheYFastFIFOMap,BaseCacheYFastFIFOMapStub
public class YFastFIFOMap<K,V> extends YFastMap<K,V> implements YFIFOMap<K,V>
- See Also:
- Serialized Form
-
-
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>
-
Nested classes/interfaces inherited from interface de.hybris.platform.util.collections.YMap
YMap.ClearHandler<K1,V1>
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.util.collections.AbstractDelegatingMap
delegateMap
-
-
Constructor Summary
Constructors Constructor Description YFastFIFOMap(int maxEntries)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.MapcreateMapInstance()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 removedvoidprocessRemoveEldest(K key, V value)booleansynchronizeExternal()-
Methods inherited from class de.hybris.platform.util.collections.YFastMap
clear, clear, containsKey, getEntry, getEntry, put, putAll, remove
-
Methods inherited from class de.hybris.platform.util.collections.AbstractDelegatingMap
containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, size, toString, values
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
createMapInstance
protected java.util.Map createMapInstance()
- Overrides:
createMapInstancein classYFastMap<K,V>
-
processRemoveEldest
public void processRemoveEldest(K key, V value)
- Specified by:
processRemoveEldestin interfaceYFIFOMap<K,V>
-
getMaxReachedSize
public int getMaxReachedSize()
Description copied from interface:CacheMapThe maximum size since initialization/creation- Specified by:
getMaxReachedSizein interfaceCacheMap<K,V>- Overrides:
getMaxReachedSizein classYFastMap<K,V>- Returns:
- the maximum size since initialization
-
maxSize
public int maxSize()
Description copied from interface:CacheMapThe maximum allowed size of the map
-
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>
-
synchronizeExternal
public boolean synchronizeExternal()
-
-