Package com.hazelcast.map
Interface MapEvictionPolicyComparator<K,V> 
- Type Parameters:
- K- type of the key
- V- type of the value
- All Superinterfaces:
- Comparator<EntryView<K,,- V>> - EvictionPolicyComparator<K,,- V, - EntryView<K, - V>> - Serializable
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface MapEvictionPolicyComparator<K,V> 
extends EvictionPolicyComparator<K,V,EntryView<K,V>>   
IMap specific EvictionPolicyComparator for
 comparing EntryViews to be evicted.
 
 Implementors of the comparator have to implement equals
 and hashCode methods to support correct config comparison.
 
 Note that you may need to enable per entry stats via
 MapConfig.setPerEntryStatsEnabled(boolean) to see
 all fields of entry view in your implementation.
- 
Method SummaryMethods inherited from interface java.util.Comparatorequals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
- 
Method Details- 
compareCompares the givenEntryViewinstances and returns the result.The result should be one of: - -1: first entry has higher priority to be evicted
- 1: second entry has higher priority to be evicted
- 0: both entries have same priority
 - Specified by:
- comparein interface- Comparator<K>
- Parameters:
- o1- the first- EntryViewinstance to be compared
- o2- the second- EntryViewinstance to be compared
- Returns:
- the result of comparison
 
 
-