Class YFastFIFOMap<K,V>

All Implemented Interfaces:
CacheMap<K,V>, YFIFOMap<K,V>, YMap<K,V>, Serializable, Map<K,V>
Direct Known Subclasses:
BaseCacheYFastFIFOMap, BaseCacheYFastFIFOMapStub

public class YFastFIFOMap<K,V> extends YFastMap<K,V> implements YFIFOMap<K,V>
See Also:
  • Constructor Details

    • YFastFIFOMap

      public YFastFIFOMap(int maxEntries)
  • Method Details

    • createMapInstance

      protected Map createMapInstance()
      Overrides:
      createMapInstance in class YFastMap<K,V>
    • processRemoveEldest

      public void processRemoveEldest(K key, V value)
      Specified by:
      processRemoveEldest in interface YFIFOMap<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>
      Overrides:
      getMaxReachedSize in class YFastMap<K,V>
      Returns:
      the maximum size since initialization
    • maxSize

      public int maxSize()
      Description copied from interface: CacheMap
      The maximum allowed size of the map
      Specified by:
      maxSize in interface CacheMap<K,V>
    • 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>
    • synchronizeExternal

      public boolean synchronizeExternal()