@InterfaceStability.Experimental @InterfaceAudience.Public public interface AnalyticsDeferredResultHandle
Modifier and Type | Method and Description |
---|---|
List<AnalyticsQueryRow> |
allRows() |
String |
getResultHandleUri()
Get the result uri if available
Throws
IllegalStateException if there is no result handle available |
String |
getStatusHandleUri()
Get the status uri
|
Iterator<AnalyticsQueryRow> |
rows() |
String |
status()
Returns the final status of the query.
|
@InterfaceAudience.Private String getStatusHandleUri()
@InterfaceAudience.Private String getResultHandleUri()
IllegalStateException
if there is no result handle availableList<AnalyticsQueryRow> allRows()
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
.Iterator<AnalyticsQueryRow> rows()
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
.String status()
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
.Copyright © 2015 Couchbase, Inc.