Class RangeRequest
- java.lang.Object
-
- com.palantir.atlasdb.keyvalue.api.RangeRequest
-
- All Implemented Interfaces:
Serializable
@Immutable public final class RangeRequest extends Object implements Serializable
Allows you to restrict a call on the database to specific rows and columns. By default, calls on a table in the key-value store cover all rows and columns in the table. To restrict the rows or columns, call the methods on theRangeRequest
class.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RangeRequest.Builder
A helper class used to construct an immutableRangeRequest
instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RangeRequest
all()
static RangeRequest.Builder
builder()
Returns aRangeRequest.Builder
instance, a helper class for instantiating immutableRangeRequest
objects.static RangeRequest.Builder
builder(boolean reverse)
boolean
containsColumn(byte[] col)
boolean
equals(Object obj)
Integer
getBatchHint()
RangeRequest.Builder
getBuilder()
SortedSet<byte[]>
getColumnNames()
An empty set of column names means that all columns are selected.byte[]
getEndExclusive()
End is exclusive.byte[]
getStartInclusive()
Start is inclusive.int
hashCode()
boolean
inRange(byte[] position)
boolean
isEmptyRange()
boolean
isReverse()
static RangeRequest.Builder
reverseBuilder()
String
toString()
RangeRequest
withBatchHint(int hint)
-
-
-
Method Detail
-
builder
public static RangeRequest.Builder builder()
Returns aRangeRequest.Builder
instance, a helper class for instantiating immutableRangeRequest
objects.
-
builder
public static RangeRequest.Builder builder(boolean reverse)
-
reverseBuilder
public static RangeRequest.Builder reverseBuilder()
-
all
public static RangeRequest all()
-
getStartInclusive
@Nonnull public byte[] getStartInclusive()
Start is inclusive. If this range is reversed, then the start will be after the end.This array may be empty if the start is unbounded.
-
getEndExclusive
@Nonnull public byte[] getEndExclusive()
End is exclusive. If this range is reversed, then the end will be before the start.This array may be empty if the end doens't have a bound.
-
getColumnNames
@Nonnull public SortedSet<byte[]> getColumnNames()
An empty set of column names means that all columns are selected.
-
containsColumn
public boolean containsColumn(byte[] col)
-
isReverse
public boolean isReverse()
-
isEmptyRange
public boolean isEmptyRange()
-
inRange
public boolean inRange(byte[] position)
-
withBatchHint
public RangeRequest withBatchHint(int hint)
-
getBuilder
public RangeRequest.Builder getBuilder()
-
-