public interface ContinuousAsyncResultSet extends AsyncPagingIterable<Row,ContinuousAsyncResultSet>
DSE replies to a continuous query with a stream of response frames. There is one instance of this class for each frame.
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancels the continuous query.
|
ExecutionInfo |
getExecutionInfo()
Returns information about the execution of this page of results.
|
int |
pageNumber()
Returns the current page's number.
|
currentPage, fetchNextPage, getColumnDefinitions, hasMorePages, map, one, remaining, wasApplied
int pageNumber()
void cancel()
There might still be rows available in the current page after the cancellation; these rows can be retrieved normally.
Also, there might be more pages available in the driver's local page cache after the cancellation; these extra pages will be discarded.
Therefore, if you plan to resume the iteration later, the correct procedure is as follows:
getExecutionInfo().getPagingState()
;
executeContinuouslyAsync
again.
AsyncPagingIterable.fetchNextPage()
that are not yet complete
will always complete exceptionally by throwing a CancellationException
, even if
they were obtained before the cancellation.@NonNull ExecutionInfo getExecutionInfo()
Note: because the driver does not support query traces for continuous queries, ExecutionInfo.getTracingId()
will always be null
.
getExecutionInfo
in interface AsyncPagingIterable<Row,ContinuousAsyncResultSet>
Copyright © 2017–2024. All rights reserved.