public interface ContinuousPagingResult extends Iterable<Row>
synchronous continuous paging query
.
A synchronous query uses asynchronous calls internally; this object handles the details of
performing those calls, and assembling the results in an Iterable
.
Note that Iterable.iterator()
will always return the same iterator instance; in other word,
this object is only iterable once, it is not possible to restart the iteration from the
beginning.
This object is not thread safe, it should only be accessed from the thread that executed the query.
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancels the continuous query.
|
ColumnDefinitions |
getColumnDefinitions()
Returns the definition of the columns returned in this result set.
|
ExecutionInfo |
getExecutionInfo()
Returns information on the execution of the query, and on the response frame corresponding to
the current state of the iteration.
|
forEach, iterator, spliterator
ColumnDefinitions getColumnDefinitions()
void cancel()
The iteration will stop at the current page in the stream of results; if the server sends more pages after the cancellation (or if more pages were available in the driver's local cache), they will be discarded. Note however that there might still be rows available in the current page.
Therefore, if you plan to resume the iteration later, the correct procedure is:
getExecutionInfo().getPagingState()
, and reinject
it in the statement to resume the iteration.
ExecutionInfo getExecutionInfo()
The driver does not support query traces for continuous queries, the corresponding field
will always be null
.
Copyright © 2012–2019. All rights reserved.