K- the type of keys maintained by IMap
V- the type of mapped values
public abstract class MapEvictionPolicy<K,V> extends Object implements Comparator<EntryView<K,V>>
MaxSizePoliciesand it helps to find most appropriate entries to remove.
IMaphas out-of-the-box eviction policies like
RandomEvictionPolicybut if there is a need to define another eviction policy, users can introduce a custom one by extending
compare(EntryView, EntryView)method must be implemented to provide an ascending order of entries. Because internal eviction algorithm will evict the smallest entry from
|Constructor and Description|
|Modifier and Type||Method and Description|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
If you prefer to evict the 1st entry then return negative number, if the 2nd entry is a better candidate then return a positive number or return 0 if both entries are equally good candidates for eviction
Copyright © 2021 Hazelcast, Inc.. All Rights Reserved.