Class SequenceComparator
- java.lang.Object
-
- org.apache.camel.component.zookeeper.NaturalSortComparator
-
- org.apache.camel.component.zookeeper.SequenceComparator
-
- All Implemented Interfaces:
Comparator<CharSequence>
public class SequenceComparator extends NaturalSortComparator
Nodes created with any of SequentialCreateMode
s will have a 10 character sequence attached to their node names.SequenceComparator
is a Natural comparator used to compare lists of objects with these appended sequences.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.camel.component.zookeeper.NaturalSortComparator
NaturalSortComparator.Order
-
-
Field Summary
Fields Modifier and Type Field Description static int
ZOOKEEPER_SEQUENCE_LENGTH
-
Constructor Summary
Constructors Constructor Description SequenceComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(CharSequence sequencedNode, CharSequence otherSequencedNode)
-
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
-
ZOOKEEPER_SEQUENCE_LENGTH
public static final int ZOOKEEPER_SEQUENCE_LENGTH
- See Also:
- Constant Field Values
-
-
Method Detail
-
compare
public int compare(CharSequence sequencedNode, CharSequence otherSequencedNode)
- Specified by:
compare
in interfaceComparator<CharSequence>
- Overrides:
compare
in classNaturalSortComparator
-
-