Interface ScanResultConsumerBase

All Known Subinterfaces:
AdvancedScanResultConsumer, ScanResultConsumer
All Known Implementing Classes:
AsyncMetaTableAccessor.MetaTableScanResultConsumer, AsyncTableResultScanner

@Public public interface ScanResultConsumerBase
The base interface for scan result consumer.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Indicate that the scan operation is completed normally.
    void
    Indicate that we hit an unrecoverable error and the scan operation is terminated.
    default void
    If scan.isScanMetricsEnabled() returns true, then this method will be called prior to all other methods in this interface to give you the ScanMetrics instance for this scan operation.
  • Method Details

    • onError

      void onError(Throwable error)
      Indicate that we hit an unrecoverable error and the scan operation is terminated.

      We will not call onComplete() after calling onError(Throwable).

    • onComplete

      void onComplete()
      Indicate that the scan operation is completed normally.
    • onScanMetricsCreated

      default void onScanMetricsCreated(ScanMetrics scanMetrics)
      If scan.isScanMetricsEnabled() returns true, then this method will be called prior to all other methods in this interface to give you the ScanMetrics instance for this scan operation. The ScanMetrics instance will be updated on-the-fly during the scan, you can store it somewhere to get the metrics at any time if you want.