public class DefaultSpatialViewResult extends Object implements SpatialViewResult
Default implementation of the SpatialViewResult.
| Constructor and Description |
|---|
DefaultSpatialViewResult(CouchbaseEnvironment env,
Bucket bucket,
rx.Observable<AsyncSpatialViewRow> rows,
boolean success,
rx.Observable<JsonObject> error,
JsonObject debug) |
| Modifier and Type | Method and Description |
|---|---|
List<SpatialViewRow> |
allRows()
Collects all rows received from the view with the default view timeout.
|
List<SpatialViewRow> |
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<SpatialViewRow> |
iterator() |
Iterator<SpatialViewRow> |
rows()
Emits one
ViewRow for each row received from the view with the default view timeout. |
Iterator<SpatialViewRow> |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic DefaultSpatialViewResult(CouchbaseEnvironment env, Bucket bucket, rx.Observable<AsyncSpatialViewRow> rows, boolean success, rx.Observable<JsonObject> error, JsonObject debug)
public List<SpatialViewRow> allRows()
SpatialViewResultCollects 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 SpatialViewResultList containing view rows.public List<SpatialViewRow> allRows(long timeout, TimeUnit timeUnit)
SpatialViewResultCollects 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 SpatialViewResultList containing view rows.public Iterator<SpatialViewRow> rows()
SpatialViewResultEmits 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 SpatialViewResultIterator containing view rows.public Iterator<SpatialViewRow> rows(long timeout, TimeUnit timeUnit)
SpatialViewResultEmits 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 SpatialViewResulttimeout - the custom timeout.timeUnit - the time unit for the custom timeout.Iterator containing view rows.public boolean success()
SpatialViewResultIf the query was successful.
success in interface SpatialViewResultpublic JsonObject error()
SpatialViewResultIf it was not successful, an error is contained here.
error in interface SpatialViewResultpublic JsonObject error(long timeout, TimeUnit timeUnit)
SpatialViewResultIf it was not successful, an error is contained here.
error in interface SpatialViewResultpublic JsonObject debug()
SpatialViewResultIf debug was enabled on the query, it is contained here.
debug in interface SpatialViewResultpublic Iterator<SpatialViewRow> iterator()
iterator in interface Iterable<SpatialViewRow>Copyright © 2015 Couchbase, Inc.