public interface AsyncContinuousPagingResult
asynchronous continuous paging query
.
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.
|
Iterable<Row> |
currentPage()
Returns an iterable of the rows in the current page.
|
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 used to build this
result.
|
boolean |
isLast()
Indicates if this is the last page in the stream of results.
|
ListenableFuture<AsyncContinuousPagingResult> |
nextPage()
Returns a future wrapping the next page in the stream of results.
|
int |
pageNumber()
Returns the page number.
|
Iterable<Row> currentPage()
More results might be available via nextPage()
.
boolean isLast()
ListenableFuture<AsyncContinuousPagingResult> nextPage()
This will return a failed future for the last page; you should always check isLast()
before calling this method.
ColumnDefinitions getColumnDefinitions()
int pageNumber()
void cancel()
The driver will send an additional request to ask DSE to stop sending results. Because that
request is asynchronous (and because the driver caches pages locally), there will probably be
more pages available (via nextPage()
) after a call to this method. However, note that
the server does not set isLast()
after a cancellation, so there is no reliable way to
detect how many of these remaining pages are left.
ExecutionInfo getExecutionInfo()
In particular, it contains the paging state for the current page.
The driver does not support query traces for continuous queries, the corresponding field
will always be null
.
Copyright © 2012–2019. All rights reserved.