Class RangeRequest.Builder
- java.lang.Object
-
- com.palantir.atlasdb.keyvalue.api.RangeRequest.Builder
-
- Enclosing class:
- RangeRequest
@NotThreadSafe public static final class RangeRequest.Builder extends Object
A helper class used to construct an immutableRangeRequest
instance.By default, the range covers all rows and columns. To restrict the rows or columns, call * the methods on the
RangeRequest
class.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RangeRequest.Builder
batchHint(Integer hint)
This is a hint for how much data the underlying system should process at a time.RangeRequest
build()
RangeRequest.Builder
endRowExclusive(byte[] end)
RangeRequest.Builder
endRowExclusive(Prefix end)
RangeRequest.Builder
endRowExclusive(com.palantir.common.persist.Persistable end)
boolean
isInvalidRange()
boolean
isReverse()
RangeRequest.Builder
prefixRange(byte[] prefix)
This will set the start and the end to get all rows that have a given prefix.RangeRequest.Builder
retainColumns(ColumnSelection selection)
RangeRequest.Builder
retainColumns(Iterable<byte[]> colsToRetain)
RangeRequest.Builder
startRowInclusive(byte[] start)
RangeRequest.Builder
startRowInclusive(Prefix start)
RangeRequest.Builder
startRowInclusive(com.palantir.common.persist.Persistable start)
-
-
-
Method Detail
-
isReverse
public boolean isReverse()
-
prefixRange
public RangeRequest.Builder prefixRange(byte[] prefix)
This will set the start and the end to get all rows that have a given prefix.
-
startRowInclusive
public RangeRequest.Builder startRowInclusive(byte[] start)
-
startRowInclusive
public RangeRequest.Builder startRowInclusive(Prefix start)
-
startRowInclusive
public RangeRequest.Builder startRowInclusive(com.palantir.common.persist.Persistable start)
-
endRowExclusive
public RangeRequest.Builder endRowExclusive(byte[] end)
-
endRowExclusive
public RangeRequest.Builder endRowExclusive(Prefix end)
-
endRowExclusive
public RangeRequest.Builder endRowExclusive(com.palantir.common.persist.Persistable end)
-
retainColumns
public RangeRequest.Builder retainColumns(Iterable<byte[]> colsToRetain)
-
retainColumns
public RangeRequest.Builder retainColumns(ColumnSelection selection)
-
batchHint
public RangeRequest.Builder batchHint(Integer hint)
This is a hint for how much data the underlying system should process at a time. If we are expecting to read a lot from this range, then this should be pretty large for performance. If we are only going to read the first thing in a range, then this should be set to 1.If hint is null then the range will use the default. Usually for
Transaction.getRange(TableReference, RangeRequest)
this means the batch size will be whatever is passed as the batch size to BatchingVisitable#batchAccept(int, com.palantir.common.base.AbortingVisitor)
-
isInvalidRange
public boolean isInvalidRange()
-
build
public RangeRequest build()
-
-