Class StableRevisionComparator
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.document.StableRevisionComparator
-
- All Implemented Interfaces:
Comparator<Revision>
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.
-
-
Field Summary
Fields Modifier and Type Field Description static Comparator<Revision>
INSTANCE
static Comparator<Revision>
REVERSE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(Revision o1, Revision o2)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Field Detail
-
INSTANCE
public static final Comparator<Revision> INSTANCE
-
REVERSE
public static final Comparator<Revision> REVERSE
-
-
Method Detail
-
compare
public int compare(Revision o1, Revision o2)
- Specified by:
compare
in interfaceComparator<Revision>
-
-