Class RangeRequest.Builder

  • Enclosing class:
    RangeRequest

    @NotThreadSafe
    public static final class RangeRequest.Builder
    extends java.lang.Object
    A helper class used to construct an immutable RangeRequest instance.

    By default, the range covers all rows and columns. To restrict the rows or columns, call * the methods on the RangeRequest class.

    • 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​(com.palantir.common.persist.Persistable start)
      • endRowExclusive

        public RangeRequest.Builder endRowExclusive​(com.palantir.common.persist.Persistable end)
      • retainColumns

        public RangeRequest.Builder retainColumns​(java.lang.Iterable<byte[]> colsToRetain)
      • batchHint

        public RangeRequest.Builder batchHint​(java.lang.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()