public interface ContinuousAsyncResultSet extends com.datastax.oss.driver.api.core.AsyncPagingIterable<com.datastax.oss.driver.api.core.cql.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.
|
com.datastax.oss.driver.api.core.cql.ExecutionInfo |
getExecutionInfo() |
int |
pageNumber()
Returns the current page's number.
|
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 com.datastax.oss.driver.api.core.cql.ExecutionInfo getExecutionInfo()
Note: because the driver does not support query traces for continuous queries, ExecutionInfo.getTracingId()
will always be null
.
getExecutionInfo
in interface com.datastax.oss.driver.api.core.AsyncPagingIterable<com.datastax.oss.driver.api.core.cql.Row,ContinuousAsyncResultSet>
Copyright © 2017–2019. All rights reserved.