public class DefaultViewResult extends java.lang.Object implements ViewResult
| Constructor and Description |
|---|
DefaultViewResult(CouchbaseEnvironment env,
Bucket bucket,
rx.Observable<AsyncViewRow> rows,
int totalRows,
boolean success,
JsonObject error,
JsonObject debug) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<ViewRow> |
allRows()
Collects all rows received from the view with the default view timeout.
|
java.util.List<ViewRow> |
allRows(long timeout,
java.util.concurrent.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.
|
java.util.Iterator<ViewRow> |
rows()
Emits one
ViewRow for each row received from the view with the default view timeout. |
java.util.Iterator<ViewRow> |
rows(long timeout,
java.util.concurrent.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.
|
public DefaultViewResult(CouchbaseEnvironment env, Bucket bucket, rx.Observable<AsyncViewRow> rows, int totalRows, boolean success, JsonObject error, JsonObject debug)
public java.util.List<ViewRow> allRows()
ViewResultCollects all rows received from the view with the default view timeout.
This method throws:
allRows in interface ViewResultList containing view rows.public java.util.List<ViewRow> allRows(long timeout, java.util.concurrent.TimeUnit timeUnit)
ViewResultCollects all rows received from the view with the default view timeout.
This method throws:
allRows in interface ViewResultList containing view rows.public java.util.Iterator<ViewRow> rows()
ViewResultEmits one ViewRow for each row received from the view with the default view timeout.
This method throws:
rows in interface ViewResultIterator containing view rows.public java.util.Iterator<ViewRow> rows(long timeout, java.util.concurrent.TimeUnit timeUnit)
ViewResultEmits one ViewRow for each row received from the view with a custom timeout.
This method throws:
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 debug()
ViewResultIf debug was enabled on the query, it is contained here.
debug in interface ViewResult