Class ResultSet

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

public class ResultSet extends Object implements Iterable<Object>, Closeable
This class manages result retrieval from queries. Multiple threads will retrieve results from the server nodes and put these results on the queue. The single user thread consumes these results from the queue.
  • Field Details

    • END

      public static final Object END
  • Method Details

    • next

      public boolean next() throws AerospikeException
      Retrieve next result. This method will block until a result is retrieved or the query is cancelled.
      Returns:
      whether result exists - if false, no more results 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<Object> iterator()
      Provide Iterator for RecordSet.
      Specified by:
      iterator in interface Iterable<Object>
    • getObject

      public Object getObject()
      Get result.
    • put

      public boolean put(Object object)
      Put object on the queue.