@NotThreadSafe public class DefaultAsyncGraphResultSet extends Object implements AsyncGraphResultSet
Constructor and Description |
---|
DefaultAsyncGraphResultSet(GraphExecutionInfo executionInfo,
Queue<GraphNode> data) |
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancels the query and asks the server to stop sending results.
|
Iterable<GraphNode> |
currentPage()
The nodes in the current page.
|
CompletionStage<? extends AsyncGraphResultSet> |
fetchNextPage()
Fetch the next page of results asynchronously.
|
GraphExecutionInfo |
getExecutionInfo()
The execution information for this page of results.
|
boolean |
hasMorePages()
Whether there are more pages of results.
|
int |
remaining()
How many rows are left before the current page is exhausted.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
one
public DefaultAsyncGraphResultSet(GraphExecutionInfo executionInfo, Queue<GraphNode> data)
@NonNull public GraphExecutionInfo getExecutionInfo()
AsyncGraphResultSet
getExecutionInfo
in interface AsyncGraphResultSet
public int remaining()
AsyncGraphResultSet
remaining
in interface AsyncGraphResultSet
@NonNull public Iterable<GraphNode> currentPage()
AsyncGraphResultSet
AsyncGraphResultSet.hasMorePages()
and
AsyncGraphResultSet.fetchNextPage()
.
Note that this method always returns the same object, and that that object can only be iterated once: nodes are "consumed" as they are read.
currentPage
in interface AsyncGraphResultSet
public boolean hasMorePages()
AsyncGraphResultSet
AsyncGraphResultSet.fetchNextPage()
to fetch the next
one asynchronously.hasMorePages
in interface AsyncGraphResultSet
@NonNull public CompletionStage<? extends AsyncGraphResultSet> fetchNextPage() throws IllegalStateException
AsyncGraphResultSet
fetchNextPage
in interface AsyncGraphResultSet
IllegalStateException
- if there are no more pages. Use AsyncGraphResultSet.hasMorePages()
to check
if you can call this method.public void cancel()
AsyncGraphResultSet
At this time, graph queries are not paginated and the server sends all the results at once; therefore this method has no effect.
cancel
in interface AsyncGraphResultSet
Copyright © 2017–2019. All rights reserved.