Interface AnalyticsDeferredResultHandle

All Known Implementing Classes:
DefaultAnalyticsDeferredResultHandle

@Experimental
@Public
public interface AnalyticsDeferredResultHandle
An async handle to fetch the status and results of a deferred Analytics Query
Since:
2.7.2
Author:
Subhashni Balakrishnan
  • Method Details

    • getStatusHandleUri

      @Private String getStatusHandleUri()
      Get the status uri
      Returns:
      uri
    • getResultHandleUri

      @Private String getResultHandleUri()
      Get the result uri if available Throws IllegalStateException if there is no result handle available
      Returns:
      uri
    • allRows

      Returns:
      the list of all AnalyticsQueryRow, the results of the query, if successful. Throws in the following circumstances - QueryExecutionException if there is no result URI available. A result URI is available only through the successful response of the status call. If the query status was still running, retrying the status call until success, would fetch the result URI. - The producer outpaces the SDK: BackpressureException - The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying: RequestCancelledException - The server is currently not able to process the request, retrying may help: TemporaryFailureException - The server is out of memory: CouchbaseOutOfMemoryException - Unexpected errors are caught and contained in a generic CouchbaseException.
    • rows

      Returns:
      an iterator over the list of all AnalyticsQueryRow, the results of the query, if successful. Throws in the following circumstances - QueryExecutionException if there is no result URI available. A result URI is available only through the successful response of the status call. If the query status was still running, retrying the status call until success, would fetch the result URI. - The producer outpaces the SDK: BackpressureException - The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying: RequestCancelledException - The server is currently not able to process the request, retrying may help: TemporaryFailureException - The server is out of memory: CouchbaseOutOfMemoryException - Unexpected errors are caught and contained in a generic CouchbaseException.
    • status

      String status()
      Returns the final status of the query. For example, a successful query will return "success" Other statuses include (but are not limited to) "running" when the query is still in execution, "fatal" when fatal errors occurred and "timeout" when the query timed out on the server side but not yet on the client side. This method blocks until the query is over and the status can be established. Throws in the following circumstances - The producer outpaces the SDK: BackpressureException - The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying: RequestCancelledException - The server is currently not able to process the request, retrying may help: TemporaryFailureException - The server is out of memory: CouchbaseOutOfMemoryException - Unexpected errors are caught and contained in a generic CouchbaseException.