@InterfaceStability.Committed @InterfaceAudience.Public public class DefaultAnalyticsQueryResult extends Object implements AnalyticsQueryResult
| Constructor and Description |
|---|
DefaultAnalyticsQueryResult(AsyncAnalyticsDeferredResultHandle asyncHandle,
Object signature,
AnalyticsMetrics info,
List<JsonObject> errors,
String finalStatus,
Boolean finalSuccess,
boolean parseSuccess,
String requestId,
String clientContextId)
Create a default blocking representation of a query result.
|
DefaultAnalyticsQueryResult(List<AsyncAnalyticsQueryRow> rows,
Object signature,
AnalyticsMetrics info,
List<JsonObject> errors,
String finalStatus,
Boolean finalSuccess,
boolean parseSuccess,
String requestId,
String clientContextId)
Create a default blocking representation of a query result.
|
| Modifier and Type | Method and Description |
|---|---|
List<AnalyticsQueryRow> |
allRows() |
String |
clientContextId() |
List<JsonObject> |
errors() |
boolean |
finalSuccess()
Denotes the success or failure of the query.
|
AnalyticsDeferredResultHandle |
handle() |
AnalyticsMetrics |
info() |
Iterator<AnalyticsQueryRow> |
iterator() |
boolean |
parseSuccess() |
String |
requestId() |
Iterator<AnalyticsQueryRow> |
rows() |
Object |
signature() |
String |
status()
Returns the final status of the query.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic DefaultAnalyticsQueryResult(List<AsyncAnalyticsQueryRow> rows, Object signature, AnalyticsMetrics info, List<JsonObject> errors, String finalStatus, Boolean finalSuccess, boolean parseSuccess, String requestId, String clientContextId)
rows - the list of rows.signature - the signature for rows.info - the metrics.errors - the list of errors and warnings.finalStatus - the definitive (but potentially delayed) status of the query.finalSuccess - the definitive (but potentially delayed) success of the query.parseSuccess - the intermediate result of the querypublic DefaultAnalyticsQueryResult(AsyncAnalyticsDeferredResultHandle asyncHandle, Object signature, AnalyticsMetrics info, List<JsonObject> errors, String finalStatus, Boolean finalSuccess, boolean parseSuccess, String requestId, String clientContextId)
asyncHandle - the deferred result handle.signature - the signature for rows.info - the metrics.errors - the list of errors and warnings.finalStatus - the definitive (but potentially delayed) status of the query.finalSuccess - the definitive (but potentially delayed) success of the query.parseSuccess - the intermediate result of the querypublic List<AnalyticsQueryRow> allRows()
allRows in interface AnalyticsQueryResultAnalyticsQueryRow, the results of the query, if successful.public Iterator<AnalyticsQueryRow> rows()
rows in interface AnalyticsQueryResultAnalyticsQueryRow, the results of the query, if successful.public Object signature()
signature in interface AnalyticsQueryResultrow. This signature is usually a
JsonObject, but could also be any JSON-valid type like a boolean scalar, JsonArray...public AnalyticsMetrics info()
info in interface AnalyticsQueryResultpublic boolean parseSuccess()
parseSuccess in interface AnalyticsQueryResultpublic List<JsonObject> errors()
errors in interface AnalyticsQueryResultpublic boolean finalSuccess()
AnalyticsQueryResultAnalyticsQueryResult.parseSuccess(), for example if a fatal error comes up while streaming the results
to the client. This method blocks until the query is over and the success can be established.finalSuccess in interface AnalyticsQueryResultpublic String status()
AnalyticsQueryResultsuccess"
(which is equivalent to AnalyticsQueryResult.finalSuccess() returning true). Other statuses include (but are not limited to)
"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.status in interface AnalyticsQueryResultpublic Iterator<AnalyticsQueryRow> iterator()
iterator in interface Iterable<AnalyticsQueryRow>public String requestId()
requestId in interface AnalyticsQueryResultpublic String clientContextId()
clientContextId in interface AnalyticsQueryResultpublic AnalyticsDeferredResultHandle handle()
handle in interface AnalyticsQueryResultCopyright © 2015 Couchbase, Inc.