Interface ScanCallback


public interface ScanCallback
An object implementing this interface is passed in scan() calls, so the caller can be notified with scan results.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    scanCallback(Key key, Record record)
    This method will be called for each record returned from a scan.
  • Method Details

    • scanCallback

      void scanCallback(Key key, Record record) throws AerospikeException
      This method will be called for each record returned from a scan. The user may throw a AerospikeException.ScanTerminated exception if the scan should be aborted. If any exception is thrown, parallel scan threads to other nodes will also be terminated and the exception will be propagated back through the initiating scan call.

      If ScanPolicy.concurrentNodes is true and ScanPolicy.maxConcurrentNodes is not equal one, then your scanCallback implementation must be thread safe.

      Parameters:
      key - unique record identifier
      record - container for bins and record meta-data
      Throws:
      AerospikeException - if error occurs or scan should be terminated.