public class DefaultViewResult extends Object implements ViewResult
| Constructor and Description |
|---|
DefaultViewResult(CouchbaseEnvironment env,
Bucket bucket,
Observable<AsyncViewRow> rows,
int totalRows,
boolean success,
Observable<JsonObject> error,
JsonObject debug) |
| Modifier and Type | Method and Description |
|---|---|
List<ViewRow> |
allRows()
Collects all rows received from the view with the default view timeout.
|
List<ViewRow> |
allRows(long timeout,
TimeUnit timeUnit)
Collects all rows received from the view with the default view timeout.
|
JsonObject |
debug()
If debug was enabled on the query, it is contained here.
|
JsonObject |
error()
If it was not successful, an error is contained here.
|
JsonObject |
error(long timeout,
TimeUnit timeUnit)
If it was not successful, an error is contained here.
|
Iterator<ViewRow> |
iterator() |
Iterator<ViewRow> |
rows()
Emits one
ViewRow for each row received from the view with the default view timeout. |
Iterator<ViewRow> |
rows(long timeout,
TimeUnit timeUnit)
Emits one
ViewRow for each row received from the view with a custom timeout. |
boolean |
success()
If the query was successful.
|
int |
totalRows()
The total number of rows.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic DefaultViewResult(CouchbaseEnvironment env, Bucket bucket, Observable<AsyncViewRow> rows, int totalRows, boolean success, Observable<JsonObject> error, JsonObject debug)
public List<ViewRow> allRows()
ViewResultCollects all rows received from the view with the default view timeout.
This method throws:
TimeoutException wrapped in a RuntimeException: If the timeout is exceeded.allRows in interface ViewResultList containing view rows.public List<ViewRow> allRows(long timeout, TimeUnit timeUnit)
ViewResultCollects all rows received from the view with the default view timeout.
This method throws:
TimeoutException wrapped in a RuntimeException: If the timeout is exceeded.allRows in interface ViewResultList containing view rows.public Iterator<ViewRow> rows()
ViewResultEmits one ViewRow for each row received from the view with the default view timeout.
This method throws:
TimeoutException wrapped in a RuntimeException: If the timeout is exceeded.rows in interface ViewResultIterator containing view rows.public Iterator<ViewRow> rows(long timeout, TimeUnit timeUnit)
ViewResultEmits one ViewRow for each row received from the view with a custom timeout.
This method throws:
TimeoutException wrapped in a RuntimeException: If the timeout is exceeded.rows in interface ViewResulttimeout - the custom timeout.timeUnit - the time unit for the custom timeout.Iterator containing view rows.public int totalRows()
ViewResultThe total number of rows.
totalRows in interface ViewResultpublic boolean success()
ViewResultIf the query was successful.
success in interface ViewResultpublic JsonObject error()
ViewResultIf it was not successful, an error is contained here.
error in interface ViewResultpublic JsonObject error(long timeout, TimeUnit timeUnit)
ViewResultIf it was not successful, an error is contained here.
error in interface ViewResultpublic JsonObject debug()
ViewResultIf debug was enabled on the query, it is contained here.
debug in interface ViewResultCopyright © 2015 Couchbase, Inc.