Interface RecordSequenceListener


public interface RecordSequenceListener
Asynchronous result notifications for batch get and scan/query commands. The results are sent one record at a time.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    This method is called when an asynchronous batch get or scan command fails.
    void
    onRecord(Key key, Record record)
    This method is called when an asynchronous record is received from the server.
    void
    This method is called when the asynchronous batch get or scan command completes.
  • Method Details

    • onRecord

      void onRecord(Key key, Record record) throws AerospikeException
      This method is called when an asynchronous record is received from the server. The receive sequence is not ordered.

      If this listener is used in a scan/query command, The user may throw a AerospikeException.QueryTerminated exception if the command should be aborted. If any exception is thrown, parallel command threads to other nodes will also be terminated and the exception will be propagated back through the onFailure() call.

      If this listener is used in a batch command, an user thrown exception will terminate the batch to the current node, but parallel batch command threads to other nodes will continue to run.

      Parameters:
      key - unique record identifier
      record - record instance, will be null if the key is not found
      Throws:
      AerospikeException - if error occurs or scan should be terminated.
    • onSuccess

      void onSuccess()
      This method is called when the asynchronous batch get or scan command completes.
    • onFailure

      void onFailure(AerospikeException ae)
      This method is called when an asynchronous batch get or scan command fails.