public class DefaultSpatialViewRow extends Object implements SpatialViewRow
SpatialViewRow
.Constructor and Description |
---|
DefaultSpatialViewRow(CouchbaseEnvironment env,
AsyncSpatialViewRow asyncViewRow) |
Modifier and Type | Method and Description |
---|---|
JsonDocument |
document()
Load the underlying document, if not reduced with the default view timeout.
|
<D extends Document<?>> |
document(Class<D> target)
Load the underlying document, if not reduced with the default view timeout.
|
<D extends Document<?>> |
document(Class<D> target,
long timeout,
TimeUnit timeUnit)
Load the underlying document, if not reduced with a custom timeout.
|
JsonDocument |
document(long timeout,
TimeUnit timeUnit)
Load the underlying document, if not reduced with a custom timeout.
|
JsonObject |
geometry() |
String |
id()
The id of the document, if not reduced.
|
JsonArray |
key()
The key of the row index.
|
String |
toString() |
Object |
value()
The value of the row index.
|
public DefaultSpatialViewRow(CouchbaseEnvironment env, AsyncSpatialViewRow asyncViewRow)
public String id()
SpatialViewRow
id
in interface SpatialViewRow
public JsonArray key()
SpatialViewRow
JsonArray
or JsonObject
.key
in interface SpatialViewRow
public Object value()
SpatialViewRow
JsonArray
or JsonObject
.value
in interface SpatialViewRow
public JsonObject geometry()
geometry
in interface SpatialViewRow
public JsonDocument document()
SpatialViewRow
TimeoutException
wrapped in a RuntimeException
: If the timeout is exceeded.
- BackpressureException
: If the incoming request rate is too high to be processed.
- IllegalStateException
: If the view is reduced and the ID is null.
- TranscodingException
: If the response document could not be decoded.document
in interface SpatialViewRow
public JsonDocument document(long timeout, TimeUnit timeUnit)
SpatialViewRow
TimeoutException
wrapped in a RuntimeException
: If the timeout is exceeded.
- BackpressureException
: If the incoming request rate is too high to be processed.
- IllegalStateException
: If the view is reduced and the ID is null.
- TranscodingException
: If the response document could not be decoded.document
in interface SpatialViewRow
timeout
- the custom timeout.timeUnit
- the time unit for the custom timeout.public <D extends Document<?>> D document(Class<D> target)
SpatialViewRow
TimeoutException
wrapped in a RuntimeException
: If the timeout is exceeded.
- BackpressureException
: If the incoming request rate is too high to be processed.
- IllegalStateException
: If the view is reduced and the ID is null.
- TranscodingException
: If the response document could not be decoded.document
in interface SpatialViewRow
target
- the custom target document type.public <D extends Document<?>> D document(Class<D> target, long timeout, TimeUnit timeUnit)
SpatialViewRow
TimeoutException
wrapped in a RuntimeException
: If the timeout is exceeded.
- BackpressureException
: If the incoming request rate is too high to be processed.
- IllegalStateException
: If the view is reduced and the ID is null.
- TranscodingException
: If the response document could not be decoded.document
in interface SpatialViewRow
target
- the custom target document type.timeout
- the custom timeout.timeUnit
- the time unit for the custom timeout.Copyright © 2015 Couchbase, Inc.