Class ReplicaReader

  • @Uncommitted
    public class ReplicaReader
    extends Object
    Helper class to deal with reading from zero to N replicas and returning results.
    Michael Nitschinger
    • Method Detail

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