@InterfaceStability.Experimental @InterfaceAudience.Public public class DefaultAnalyticsDeferredResultHandle extends Object implements AnalyticsDeferredResultHandle
AnalyticsDeferredResultHandle
Constructor and Description |
---|
DefaultAnalyticsDeferredResultHandle(AsyncAnalyticsDeferredResultHandle asyncHandle) |
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.
|
String |
toString() |
public DefaultAnalyticsDeferredResultHandle(AsyncAnalyticsDeferredResultHandle asyncHandle)
public String getStatusHandleUri()
AnalyticsDeferredResultHandle
getStatusHandleUri
in interface AnalyticsDeferredResultHandle
public String getResultHandleUri()
AnalyticsDeferredResultHandle
IllegalStateException
if there is no result handle availablegetResultHandleUri
in interface AnalyticsDeferredResultHandle
public List<AnalyticsQueryRow> allRows()
allRows
in interface AnalyticsDeferredResultHandle
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
.public Iterator<AnalyticsQueryRow> rows()
rows
in interface AnalyticsDeferredResultHandle
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
.public String status()
AnalyticsDeferredResultHandle
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
.status
in interface AnalyticsDeferredResultHandle
Copyright © 2015 Couchbase, Inc.