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 of
AnalyticsDeferredResultHandle
- Since:
- 2.7.2
- Author:
- Subhashni Balakrishnan
-
Constructor Summary
Constructors Constructor Description DefaultAnalyticsDeferredResultHandle(AsyncAnalyticsDeferredResultHandle asyncHandle)
-
Method Summary
Modifier and Type Method Description List<AnalyticsQueryRow>
allRows()
String
getResultHandleUri()
Get the result uri if available ThrowsIllegalStateException
if there is no result handle availableString
getStatusHandleUri()
Get the status uriIterator<AnalyticsQueryRow>
rows()
String
status()
Returns the final status of the query.String
toString()
-
Constructor Details
-
DefaultAnalyticsDeferredResultHandle
-
-
Method Details
-
getStatusHandleUri
Description copied from interface:AnalyticsDeferredResultHandle
Get the status uri- Specified by:
getStatusHandleUri
in interfaceAnalyticsDeferredResultHandle
- Returns:
- uri
-
getResultHandleUri
Description copied from interface:AnalyticsDeferredResultHandle
Get the result uri if available ThrowsIllegalStateException
if there is no result handle available- Specified by:
getResultHandleUri
in interfaceAnalyticsDeferredResultHandle
- Returns:
- uri
-
allRows
- Specified by:
allRows
in interfaceAnalyticsDeferredResultHandle
- 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 genericCouchbaseException
.
-
rows
- Specified by:
rows
in interfaceAnalyticsDeferredResultHandle
- 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 genericCouchbaseException
.
-
status
Description copied from interface:AnalyticsDeferredResultHandle
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 genericCouchbaseException
.- Specified by:
status
in interfaceAnalyticsDeferredResultHandle
-
toString
-