Class RangeRequests
- java.lang.Object
-
- com.palantir.atlasdb.keyvalue.api.RangeRequests
-
public final class RangeRequests extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
createEndNameForPrefixScan(byte[] rowName)
This will return the row name that will include exactly all prefix matches if passed toKeyValueService.getRange(TableReference, RangeRequest, long)
.static byte[]
endRowExclusiveOrOneAfterMax(RangeRequest rangeRequest)
This is a replacement for endRow when doing a non-reverse range request.static ColumnSelection
extractColumnSelection(RangeRequest rangeRequest)
static byte[]
getFirstRowName()
static byte[]
getLastColumnName()
static byte[]
getLastRowName()
static byte[]
getNextStartRow(boolean reverse, byte[] rowName)
static byte[]
getNextStartRowUnlessTerminal(boolean reverse, byte[] rowName)
static boolean
isContiguousRange(boolean reverse, byte[] startInclusive, byte[] endExclusive)
static boolean
isExactlyEmptyRange(byte[] startInclusive, byte[] endExclusive)
static boolean
isFirstRowName(boolean reverse, byte[] name)
static boolean
isFirstRowName(byte[] name)
static boolean
isLastColumnName(byte[] name)
static boolean
isLastRowName(byte[] name)
static boolean
isTerminalRow(boolean reverse, byte[] rowName)
static byte[]
nextLexicographicName(byte[] name)
static RangeRequest
ofSingleRow(byte[] row)
static byte[]
oneAfterMaximumName()
static byte[]
previousLexicographicName(byte[] name)
This will return the first byte[] less than the given byte[] lexicographically.static byte[]
startRowInclusiveOrLargestRow(RangeRequest rangeRequest)
This is a replacement for startRow when doing reverse range request.
-
-
-
Method Detail
-
previousLexicographicName
public static byte[] previousLexicographicName(@Nonnull byte[] name)
This will return the first byte[] less than the given byte[] lexicographically.If name is the array
new byte[] { 0 }
an empty byte[] will be returned.This method will throw if the empty byte array is passed. It will also reject arrays with length greater than
Cell.MAX_NAME_LENGTH
-
createEndNameForPrefixScan
public static byte[] createEndNameForPrefixScan(@Nonnull byte[] rowName)
This will return the row name that will include exactly all prefix matches if passed toKeyValueService.getRange(TableReference, RangeRequest, long)
.- Parameters:
rowName
- must be non-null
-
nextLexicographicName
public static byte[] nextLexicographicName(@Nonnull byte[] name)
-
oneAfterMaximumName
public static byte[] oneAfterMaximumName()
-
endRowExclusiveOrOneAfterMax
public static byte[] endRowExclusiveOrOneAfterMax(RangeRequest rangeRequest)
This is a replacement for endRow when doing a non-reverse range request.
-
startRowInclusiveOrLargestRow
public static byte[] startRowInclusiveOrLargestRow(RangeRequest rangeRequest)
This is a replacement for startRow when doing reverse range request.
-
extractColumnSelection
public static ColumnSelection extractColumnSelection(RangeRequest rangeRequest)
-
getFirstRowName
public static byte[] getFirstRowName()
-
getLastRowName
public static byte[] getLastRowName()
-
getLastColumnName
public static byte[] getLastColumnName()
-
isFirstRowName
public static boolean isFirstRowName(boolean reverse, @Nonnull byte[] name)
-
isFirstRowName
public static boolean isFirstRowName(@Nonnull byte[] name)
-
isLastRowName
public static boolean isLastRowName(@Nonnull byte[] name)
-
isLastColumnName
public static boolean isLastColumnName(@Nonnull byte[] name)
-
isTerminalRow
public static boolean isTerminalRow(boolean reverse, @Nonnull byte[] rowName)
-
getNextStartRow
public static byte[] getNextStartRow(boolean reverse, @Nonnull byte[] rowName)
-
getNextStartRowUnlessTerminal
@Nullable public static byte[] getNextStartRowUnlessTerminal(boolean reverse, @Nonnull byte[] rowName)
-
isContiguousRange
public static boolean isContiguousRange(boolean reverse, byte[] startInclusive, byte[] endExclusive)
-
isExactlyEmptyRange
public static boolean isExactlyEmptyRange(byte[] startInclusive, byte[] endExclusive)
-
ofSingleRow
public static RangeRequest ofSingleRow(@Nonnull byte[] row)
-
-