public abstract class EvictionPolicyComparator<K,V,E extends EvictableEntryView<K,V>> extends Object implements Comparator<E>, Serializable
Comparator
to be used while comparing
entries to be evicted.Modifier and Type | Field and Description |
---|---|
static int |
BOTH_OF_ENTRIES_HAVE_SAME_PRIORITY_TO_BE_EVICTED
Integer constant for representing behaviour for giving same priority to both of entry to be evicted.
|
static int |
FIRST_ENTRY_HAS_HIGHER_PRIORITY_TO_BE_EVICTED
Integer constant for representing behaviour for giving higher priority to first entry to be evicted.
|
static int |
SECOND_ENTRY_HAS_HIGHER_PRIORITY_TO_BE_EVICTED
Integer constant for representing behaviour for giving higher priority to second entry to be evicted.
|
Constructor and Description |
---|
EvictionPolicyComparator() |
Modifier and Type | Method and Description |
---|---|
abstract int |
compare(E e1,
E e2)
Compares the given
EvictableEntryView instances and returns the result. |
boolean |
equals(Object obj) |
int |
hashCode() |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public static final int FIRST_ENTRY_HAS_HIGHER_PRIORITY_TO_BE_EVICTED
public static final int SECOND_ENTRY_HAS_HIGHER_PRIORITY_TO_BE_EVICTED
public static final int BOTH_OF_ENTRIES_HAVE_SAME_PRIORITY_TO_BE_EVICTED
public abstract int compare(E e1, E e2)
EvictableEntryView
instances and returns the result.
The result should be one of the
compare
in interface Comparator<E extends EvictableEntryView<K,V>>
e1
- the first EvictableEntryView
instance to be comparede2
- the second EvictableEntryView
instance to be comparedpublic boolean equals(Object obj)
equals
in interface Comparator<E extends EvictableEntryView<K,V>>
equals
in class Object
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.