Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,9 @@ public <T> ArangoCursor<T> cursor(final String cursorId, final Class<T> type, fi
private <T> ArangoCursor<T> createCursor(
final CursorEntity<T> result,
final Class<T> type,
final AqlQueryOptions options,
final AqlQueryOptions opts,
final HostHandle hostHandle) {
AqlQueryOptions options = opts != null ? opts : new AqlQueryOptions();

final ArangoCursorExecute<T> execute = new ArangoCursorExecute<T>() {
@Override
Expand All @@ -223,8 +224,7 @@ public void close(final String id) {
}
}
};

return new ArangoCursorImpl<>(execute, type, result);
return new ArangoCursorImpl<>(execute, type, result, options.getAllowRetry());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ public class ArangoCursorImpl<T> implements ArangoCursor<T> {
private final boolean allowRetry;

public ArangoCursorImpl(final ArangoCursorExecute<T> execute,
final Class<T> type, final CursorEntity<T> result) {
final Class<T> type, final CursorEntity<T> result, final Boolean allowRetry) {
super();
this.execute = execute;
this.type = type;
id = result.getId();
pontentialDirtyRead = result.isPotentialDirtyRead();
iterator = new ArangoCursorIterator<>(id, execute, result);
this.allowRetry = result.getNextBatchId() != null;
this.allowRetry = Boolean.TRUE.equals(allowRetry);
}

@Override
Expand Down