Class RangeScanOrchestrator


  • @Internal
    public class RangeScanOrchestrator
    extends Object
    Main entry point from higher level languages to perform KV range scans.

    This class is meant as a low-level abstraction which is to be consumed from the higher level language bindings and not directly by the user. See the respective documentation for each language binding (java, scala, kotlin) for example usage.

    • Field Detail

      • RANGE_SCAN_DEFAULT_BATCH_BYTE_LIMIT

        public static final int RANGE_SCAN_DEFAULT_BATCH_BYTE_LIMIT
        See Also:
        Constant Field Values
      • RANGE_SCAN_DEFAULT_BATCH_ITEM_LIMIT

        public static final int RANGE_SCAN_DEFAULT_BATCH_ITEM_LIMIT
        See Also:
        Constant Field Values
    • Constructor Detail

      • RangeScanOrchestrator

        public RangeScanOrchestrator​(Core core,
                                     CollectionIdentifier collectionIdentifier)
        Creates a new RangeScanOrchestrator which can be shared across calls.
        Parameters:
        core - the core to perform ops against.
        collectionIdentifier - the pointer to the right collection to use.
    • Method Detail

      • rangeScan

        public Flux<CoreRangeScanItem> rangeScan​(byte[] startTerm,
                                                 boolean startExclusive,
                                                 byte[] endTerm,
                                                 boolean endExclusive,
                                                 Duration timeout,
                                                 int continueItemLimit,
                                                 int continueByteLimit,
                                                 boolean keysOnly,
                                                 CoreRangeScanSort sort,
                                                 Optional<RequestSpan> parent,
                                                 Map<Short,​MutationToken> consistencyTokens)
        Performs a range scan between a start and an end term (reactive).
        Parameters:
        startTerm - the start term used for the range scan.
        startExclusive - if the start term is exclusive or inclusive.
        endTerm - the end term used for the range scan.
        endExclusive - if the end term is exclusive or inclusive.
        timeout - the timeout for the full operation.
        continueItemLimit - the number of items to load (max) per continue operation.
        continueByteLimit - the number of bytes to load (max) per continue operation.
        keysOnly - if only keys should be loaded.
        sort - the sorting to apply (could be none).
        parent - the optional span parent to use.
        Returns:
        a Flux of returned items, or a failed flux during errors.
      • samplingScan

        public Flux<CoreRangeScanItem> samplingScan​(long limit,
                                                    Optional<Long> seed,
                                                    Duration timeout,
                                                    int continueItemLimit,
                                                    int continueByteLimit,
                                                    boolean keysOnly,
                                                    CoreRangeScanSort sort,
                                                    Optional<RequestSpan> parent,
                                                    Map<Short,​MutationToken> consistencyTokens)
        Performs a sampling scan (reactive).
        Parameters:
        limit - the number of items to load for the sampling scan.
        seed - the seed number to be used.
        timeout - the timeout for the full operation.
        continueItemLimit - the number of items to load (max) per continue operation.
        continueByteLimit - the number of bytes to load (max) per continue operation.
        keysOnly - if only keys should be loaded.
        sort - the sorting to apply (could be none).
        parent - the optional span parent to use.
        Returns:
        a Flux of returned items, or a failed flux during errors.