public class ArangoCursorImpl<T> extends AbstractArangoIterable<T> implements ArangoCursor<T>
Modifier and Type | Field and Description |
---|---|
protected ArangoCursorIterator<T> |
iterator |
Constructor and Description |
---|
ArangoCursorImpl(com.arangodb.internal.InternalArangoDatabase<?,?> db,
com.arangodb.internal.ArangoCursorExecute execute,
Class<T> type,
CursorEntity result) |
Modifier and Type | Method and Description |
---|---|
List<T> |
asListRemaining() |
void |
close() |
protected ArangoCursorIterator<T> |
createIterator(ArangoCursor<T> cursor,
com.arangodb.internal.InternalArangoDatabase<?,?> db,
com.arangodb.internal.ArangoCursorExecute execute,
CursorEntity result) |
void |
foreach(Consumer<? super T> action)
Performs the given action for each element of the
ArangoIterable |
Integer |
getCount() |
String |
getId() |
String |
getNextBatchId() |
CursorEntity.Stats |
getStats() |
Class<T> |
getType() |
Collection<CursorEntity.Warning> |
getWarnings() |
boolean |
hasNext() |
boolean |
isCached() |
boolean |
isPotentialDirtyRead() |
ArangoIterator<T> |
iterator() |
T |
next()
Returns the next element in the iteration.
|
void |
remove() |
allMatch, anyMatch, collectInto, count, filter, first, map, noneMatch, stream
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
allMatch, anyMatch, collectInto, count, filter, first, map, noneMatch, stream
forEach, spliterator
forEachRemaining
protected final ArangoCursorIterator<T> iterator
public ArangoCursorImpl(com.arangodb.internal.InternalArangoDatabase<?,?> db, com.arangodb.internal.ArangoCursorExecute execute, Class<T> type, CursorEntity result)
protected ArangoCursorIterator<T> createIterator(ArangoCursor<T> cursor, com.arangodb.internal.InternalArangoDatabase<?,?> db, com.arangodb.internal.ArangoCursorExecute execute, CursorEntity result)
public String getId()
getId
in interface ArangoCursor<T>
public Class<T> getType()
getType
in interface ArangoCursor<T>
public Integer getCount()
getCount
in interface ArangoCursor<T>
public CursorEntity.Stats getStats()
getStats
in interface ArangoCursor<T>
public Collection<CursorEntity.Warning> getWarnings()
getWarnings
in interface ArangoCursor<T>
public boolean isCached()
isCached
in interface ArangoCursor<T>
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public T next()
ArangoCursor
AqlQueryOptions.allowRetry(Boolean)
), then it is safe to retry invoking
this method in case of I/O exceptions (which are actually thrown as ArangoDBException
with
cause IOException
).
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).public List<T> asListRemaining()
asListRemaining
in interface ArangoCursor<T>
List
public boolean isPotentialDirtyRead()
isPotentialDirtyRead
in interface ArangoCursor<T>
public ArangoIterator<T> iterator()
public void foreach(Consumer<? super T> action)
ArangoIterable
ArangoIterable
foreach
in interface ArangoIterable<T>
action
- a action to perform on the elementspublic String getNextBatchId()
getNextBatchId
in interface ArangoCursor<T>
Copyright © 2016–2023 ArangoDB GmbH. All rights reserved.