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, wait
forEach, spliterator
public DefaultSpatialViewResult(CouchbaseEnvironment env, Bucket bucket, rx.Observable<AsyncSpatialViewRow> rows, boolean success, rx.Observable<JsonObject> error, JsonObject debug)
public List<SpatialViewRow> allRows()
SpatialViewResult
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 SpatialViewResult
List
containing view rows.public List<SpatialViewRow> allRows(long timeout, TimeUnit timeUnit)
SpatialViewResult
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 SpatialViewResult
List
containing view rows.public Iterator<SpatialViewRow> rows()
SpatialViewResult
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 SpatialViewResult
Iterator
containing view rows.public Iterator<SpatialViewRow> rows(long timeout, TimeUnit timeUnit)
SpatialViewResult
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 SpatialViewResult
timeout
- the custom timeout.timeUnit
- the time unit for the custom timeout.Iterator
containing view rows.public boolean success()
SpatialViewResult
If the query was successful.
success
in interface SpatialViewResult
public JsonObject error()
SpatialViewResult
If it was not successful, an error is contained here.
error
in interface SpatialViewResult
public JsonObject error(long timeout, TimeUnit timeUnit)
SpatialViewResult
If it was not successful, an error is contained here.
error
in interface SpatialViewResult
public JsonObject debug()
SpatialViewResult
If debug was enabled on the query, it is contained here.
debug
in interface SpatialViewResult
public Iterator<SpatialViewRow> iterator()
iterator
in interface Iterable<SpatialViewRow>
Copyright © 2015 Couchbase, Inc.