@InterfaceStability.Uncommitted @InterfaceAudience.Private public class ReplicaReader extends Object
Helper class to deal with reading from zero to N replicas and returning results.
Constructor and Description |
---|
ReplicaReader() |
Modifier and Type | Method and Description |
---|---|
static Observable<GetResponse> |
read(ClusterFacade core,
String id,
ReplicaMode type,
String bucket)
Perform replica reads to as many nodes a possible based on the given
ReplicaMode . |
public static Observable<GetResponse> read(ClusterFacade core, String id, ReplicaMode type, String bucket)
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.