Package com.couchbase.client.core.config

Examples of com.couchbase.client.core.config.Partition.replica()


        Partition partition = config.partitions().get(partitionId);

        int nodeId;
        if (request instanceof ReplicaGetRequest) {
            nodeId = partition.replica(((ReplicaGetRequest) request).replica()-1);
        } else if(request instanceof ObserveRequest && ((ObserveRequest) request).replica() > 0){
            nodeId = partition.replica(((ObserveRequest) request).replica()-1);
        } else {
            nodeId = partition.master();
        }
View Full Code Here


        int nodeId;
        if (request instanceof ReplicaGetRequest) {
            nodeId = partition.replica(((ReplicaGetRequest) request).replica()-1);
        } else if(request instanceof ObserveRequest && ((ObserveRequest) request).replica() > 0){
            nodeId = partition.replica(((ObserveRequest) request).replica()-1);
        } else {
            nodeId = partition.master();
        }

        if (nodeId == -2) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.