Class ReplicaReader

java.lang.Object
com.couchbase.client.java.bucket.ReplicaReader

@Uncommitted
@Private
public class ReplicaReader
extends Object
Helper class to deal with reading from zero to N replicas and returning results.
Since:
2.1.4
Author:
Michael Nitschinger
  • Method Details

    • read

      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.
      Parameters:
      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.
      Returns:
      a potentially empty observable with the returned raw responses.