com.aerospike.client.listener
Interface RecordSequenceListener


public interface RecordSequenceListener

Asynchronous result notifications for batch get and scan commands. The results are sent one record at a time.


Method Summary
 void onFailure(AerospikeException exception)
          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 onSuccess()
          This method is called when the asynchronous batch get or scan command completes.
 

Method Detail

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.

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 commandFailed() call.

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 exception)
This method is called when an asynchronous batch get or scan command fails.

Parameters:
exception - error that occurred


Copyright © 2012–2014 Aerospike, Inc. All rights reserved.