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, wait
forEach, spliterator
public DefaultViewResult(CouchbaseEnvironment env, Bucket bucket, Observable<AsyncViewRow> rows, int totalRows, boolean success, Observable<JsonObject> error, JsonObject debug)
public List<ViewRow> allRows()
ViewResult
Collects 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 ViewResult
List
containing view rows.public List<ViewRow> allRows(long timeout, TimeUnit timeUnit)
ViewResult
Collects 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 ViewResult
List
containing view rows.public Iterator<ViewRow> rows()
ViewResult
Emits 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 ViewResult
Iterator
containing view rows.public Iterator<ViewRow> rows(long timeout, TimeUnit timeUnit)
ViewResult
Emits 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 ViewResult
timeout
- the custom timeout.timeUnit
- the time unit for the custom timeout.Iterator
containing view rows.public int totalRows()
ViewResult
The total number of rows.
totalRows
in interface ViewResult
public boolean success()
ViewResult
If the query was successful.
success
in interface ViewResult
public JsonObject error()
ViewResult
If it was not successful, an error is contained here.
error
in interface ViewResult
public JsonObject error(long timeout, TimeUnit timeUnit)
ViewResult
If it was not successful, an error is contained here.
error
in interface ViewResult
public JsonObject debug()
ViewResult
If debug was enabled on the query, it is contained here.
debug
in interface ViewResult
Copyright © 2014 Couchbase, Inc.