Class DefaultAnalyticsDeferredResultHandle
- java.lang.Object
-
- com.couchbase.client.java.analytics.DefaultAnalyticsDeferredResultHandle
-
- All Implemented Interfaces:
AnalyticsDeferredResultHandle
@Experimental @Public public class DefaultAnalyticsDeferredResultHandle extends Object implements AnalyticsDeferredResultHandle
Default implementation ofAnalyticsDeferredResultHandle- Since:
- 2.7.2
- Author:
- Subhashni Balakrishnan
-
-
Constructor Summary
Constructors Constructor Description DefaultAnalyticsDeferredResultHandle(AsyncAnalyticsDeferredResultHandle asyncHandle)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<AnalyticsQueryRow>allRows()StringgetResultHandleUri()Get the result uri if available ThrowsIllegalStateExceptionif there is no result handle availableStringgetStatusHandleUri()Get the status uriIterator<AnalyticsQueryRow>rows()Stringstatus()Returns the final status of the query.StringtoString()
-
-
-
Constructor Detail
-
DefaultAnalyticsDeferredResultHandle
public DefaultAnalyticsDeferredResultHandle(AsyncAnalyticsDeferredResultHandle asyncHandle)
-
-
Method Detail
-
getStatusHandleUri
public String getStatusHandleUri()
Description copied from interface:AnalyticsDeferredResultHandleGet the status uri- Specified by:
getStatusHandleUriin interfaceAnalyticsDeferredResultHandle- Returns:
- uri
-
getResultHandleUri
public String getResultHandleUri()
Description copied from interface:AnalyticsDeferredResultHandleGet the result uri if available ThrowsIllegalStateExceptionif there is no result handle available- Specified by:
getResultHandleUriin interfaceAnalyticsDeferredResultHandle- Returns:
- uri
-
allRows
public List<AnalyticsQueryRow> allRows()
- Specified by:
allRowsin interfaceAnalyticsDeferredResultHandle- Returns:
- the list of all
AnalyticsQueryRow, the results of the query, if successful. Throws in the following circumstances -QueryExecutionExceptionif 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 genericCouchbaseException.
-
rows
public Iterator<AnalyticsQueryRow> rows()
- Specified by:
rowsin interfaceAnalyticsDeferredResultHandle- Returns:
- an iterator over the list of all
AnalyticsQueryRow, the results of the query, if successful. Throws in the following circumstances -QueryExecutionExceptionif 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 genericCouchbaseException.
-
status
public String status()
Description copied from interface:AnalyticsDeferredResultHandleReturns 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 genericCouchbaseException.- Specified by:
statusin interfaceAnalyticsDeferredResultHandle
-
-