public interface QueryCursor<T> extends Iterable<T>, AutoCloseable
Iterable
only for convenience, e.g. Iterable.iterator()
can be obtained only once. Also if iteration is started then getAll()
method calls are prohibited.
During execution, getAll()
and Iterable.iterator()
may throw exceptions:
SqlMemoryQuotaExceededException
if the query memory quota is exceededCacheException
if an error occurs, possibly caused by:
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes all resources related to this cursor.
|
List<T> |
getAll()
Gets all query results and stores them in the collection.
|
forEach, iterator, spliterator
List<T> getAll()
Since all the results will be fetched, all the resources will be closed
automatically after this call, e.g. there is no need to call close()
method in this case.
void close()
Note: don't forget to close query cursors. Not doing so may lead to various resource leaks.
close
in interface AutoCloseable
GridGain In-Memory Computing Platform : ver. 8.9.14 Release Date : November 5 2024