@InterfaceStability.Uncommitted @InterfaceAudience.Private public class ReplicaReader extends Object
Helper class to deal with reading from zero to N replicas and returning results.
Modifier and Type | Method and Description |
---|---|
static <D extends Document<?>> |
read(ClusterFacade core,
String id,
ReplicaMode type,
String bucket,
Map<Class<? extends Document>,Transcoder<? extends Document,?>> transcoders,
Class<D> target,
CouchbaseEnvironment environment,
long timeout,
TimeUnit timeUnit)
Perform replica reads to as many nodes a possible based on the given
ReplicaMode . |
public static <D extends Document<?>> rx.Observable<D> read(ClusterFacade core, String id, ReplicaMode type, String bucket, Map<Class<? extends Document>,Transcoder<? extends Document,?>> transcoders, Class<D> target, CouchbaseEnvironment environment, long timeout, TimeUnit timeUnit)
Perform replica reads to as many nodes a possible based on the given ReplicaMode
.
Individual errors are swallowed, but logged.
core
- the core reference.id
- the id of the document to load from the replicas.type
- the replica mode type.bucket
- the name of the bucket to load it from.Copyright © 2015 Couchbase, Inc.