Package com.arangodb
Interface ArangoCursor<T>
- All Superinterfaces:
ArangoIterable<T>
,ArangoIterator<T>
,AutoCloseable
,Closeable
,Iterable<T>
,Iterator<T>
- All Known Implementing Classes:
ArangoCursorImpl
- Author:
- Mark Vollmary
-
Method Summary
Methods inherited from interface com.arangodb.ArangoIterable
iterator, stream
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface java.util.Iterator
forEachRemaining, hasNext, remove
-
Method Details
-
getId
String getId()- Returns:
- id of temporary cursor created on the server
-
getType
- Returns:
- the type of the result elements
-
getCount
Integer getCount()- Returns:
- the total number of result documents available (only available if the query was executed with the count attribute set)
-
getStats
CursorStats getStats()- Returns:
- extra information about the query result. For data-modification queries, the stats will contain the number of modified documents and the number of documents that could not be modified due to an error (if ignoreErrors query option is specified)
-
getWarnings
Collection<CursorWarning> getWarnings()- Returns:
- warnings which the query could have been produced
-
isCached
boolean isCached()- Returns:
- indicating whether the query result was served from the query cache or not
-
asListRemaining
- Returns:
- the remaining results as a
List
-
isPotentialDirtyRead
boolean isPotentialDirtyRead()- Returns:
- true if the result is a potential dirty read
- Since:
- ArangoDB 3.10
-
getNextBatchId
String getNextBatchId()- Returns:
- The ID of the batch after the current one. The first batch has an ID of 1 and the value is incremented by 1 with every batch. Only set if the allowRetry query option is enabled.
- Since:
- ArangoDB 3.11
-
next
T next()Returns the next element in the iteration. If the cursor allows retries (seeAqlQueryOptions.allowRetry(Boolean)
), then it is safe to retry invoking this method in case of I/O exceptions (which are actually thrown asArangoDBException
with causeIOException
). If the cursor does not allow retries (default), then it is not safe to retry invoking this method in case of I/O exceptions, since the request to fetch the next batch is not idempotent (i.e. the cursor may advance multiple times on the server).- Specified by:
next
in interfaceIterator<T>
- Returns:
- the next element in the iteration
- Throws:
NoSuchElementException
- if the iteration has no more elements
-