public interface DBComparator extends Comparator<byte[]>
| Modifier and Type | Method and Description |
|---|---|
byte[] |
findShortestSeparator(byte[] start,
byte[] limit)
If
start < limit, returns a short key in [start,limit). |
byte[] |
findShortSuccessor(byte[] key)
returns a 'short key' where the 'short key' is greater than or equal to key.
|
String |
name()
The name of the comparator.
|
compare, comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongString name()
The client of this package should switch to a new name whenever the comparator implementation changes in a way that will cause the relative ordering of any two keys to change.
byte[] findShortestSeparator(byte[] start,
byte[] limit)
start < limit, returns a short key in [start,limit).
Simple comparator implementations should return start unchanged,
i.e., an implementation of this method that does nothing is correct.byte[] findShortSuccessor(byte[] key)
Copyright © 2011–2020. All rights reserved.