Interface StoreScanner.ScanCursor<Reference>

  • All Superinterfaces:
    java.lang.AutoCloseable
    Enclosing interface:
    StoreScanner<Reference>

    public static interface StoreScanner.ScanCursor<Reference>
    extends java.lang.AutoCloseable
    • Method Detail

      • reserveBatch

        boolean reserveBatch()
        Advances the underlying entity cursor to the next batch of records.
        Returns:
        true, iff the batch contains data and needs to be consumed
      • consumeBatch

        boolean consumeBatch​(StoreScanner.RecordConsumer<Reference> consumer)
        Consumes the current batch using the given consumer. The consumer is typically an instance of RecordsBatchBuffer.
        The method returns a boolean to indicate whether the current batch has been completely consumed or not. This gives the consumer the option to indicate that, e.g. its buffer is full and needs to be flushed before it can continue consuming.
        This is usually the case if the underlying scan returns batches that exceed the configured size of the RecordsBatchBuffer.
        Parameters:
        consumer - A consumer for the records returned by the scan, usually a RecordsBatchBuffer.
        Returns:
        true, iff the batch is completely consumed
      • close

        void close()
        Specified by:
        close in interface java.lang.AutoCloseable