Class RecordSet

java.lang.Object
com.aerospike.client.query.RecordSet
All Implemented Interfaces:
Closeable, AutoCloseable, Iterable<com.aerospike.client.query.KeyRecord>

public class RecordSet extends Object implements Iterable<com.aerospike.client.query.KeyRecord>, Closeable
This class manages record retrieval from queries. Multiple threads will retrieve records from the server nodes and put these records on the queue. The single user thread consumes these records from the queue.
  • Field Details

    • END

      public static final com.aerospike.client.query.KeyRecord END
  • Method Details

    • next

      public boolean next() throws AerospikeException
      Retrieve next record. This method will block until a record is retrieved or the query is cancelled.
      Returns:
      whether record exists - if false, no more records are available
      Throws:
      AerospikeException
    • close

      public void close()
      Close query.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • iterator

      public Iterator<com.aerospike.client.query.KeyRecord> iterator()
      Provide Iterator for RecordSet.
      Specified by:
      iterator in interface Iterable<com.aerospike.client.query.KeyRecord>
    • getKey

      public Key getKey()
      Get record's unique identifier.
    • getRecord

      public Record getRecord()
      Get record's header and bin data.