Package com.aerospike.client.query
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 Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close query.getKey()Get record's unique identifier.com.aerospike.client.query.KeyRecordGet key and record.Get record's header and bin data.Iterator<com.aerospike.client.query.KeyRecord> iterator()Provide Iterator for RecordSet.booleannext()Retrieve next record.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
END
public static final com.aerospike.client.query.KeyRecord END
-
-
Method Details
-
next
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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
iterator
Provide Iterator for RecordSet. -
getKey
Get record's unique identifier. -
getRecord
Get record's header and bin data. -
getKeyRecord
public com.aerospike.client.query.KeyRecord getKeyRecord()Get key and record.
-