public interface GraphResultSet extends Iterable<GraphNode>
This object is a container for GraphNode
objects that will contain the data returned
by Graph queries.
Note that this object can only be iterated once: items are "consumed" as they are read,
subsequent calls to iterator()
will return the same iterator instance.
The default implementation returned by the driver is not thread-safe. It can only be
iterated by the thread that invoked dseSession.execute
.
GraphNode
,
GraphSession.execute(GraphStatement)
Modifier and Type | Method and Description |
---|---|
default List<GraphNode> |
all()
Returns all the remaining nodes as a list; not recommended for paginated queries that return
a large number of nodes.
|
void |
cancel()
Cancels the query and asks the server to stop sending results.
|
GraphExecutionInfo |
getExecutionInfo()
Deprecated.
Use
getRequestExecutionInfo() instead. |
default ExecutionInfo |
getRequestExecutionInfo()
The execution information for the query that have been performed to assemble this result set.
|
default GraphNode |
one()
Returns the next node, or
null if the result set is exhausted. |
forEach, iterator, spliterator
@Nullable default GraphNode one()
null
if the result set is exhausted.
This is convenient for queries that are known to return exactly one row, for example count queries.
@NonNull default List<GraphNode> all()
At this time (DSE 6.0.0), graph queries are not paginated and the server sends all the results at once.
void cancel()
At this time (DSE 6.0.0), graph queries are not paginated and the server sends all the results at once; therefore this method has no effect.
@NonNull default ExecutionInfo getRequestExecutionInfo()
@Deprecated @NonNull GraphExecutionInfo getExecutionInfo()
getRequestExecutionInfo()
instead.Copyright © 2017–2020. All rights reserved.