public class StableRevisionComparator extends Object implements Comparator<Revision>
StableRevisionComparator implements a revision comparator, which
is only based on stable information available in the two revisions presented
to this comparator. This class is used in sorted collections where
revision keys must have a stable ordering independent from the time when
a revision was seen.
Revisions are first ordered by timestamp, then counter and finally cluster node id.
| Modifier and Type | Field and Description |
|---|---|
static Comparator<Revision> |
INSTANCE |
static Comparator<Revision> |
REVERSE |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(Revision o1,
Revision o2) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic static final Comparator<Revision> INSTANCE
public static final Comparator<Revision> REVERSE
public int compare(Revision o1, Revision o2)
compare in interface Comparator<Revision>Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.