incoming = core
.<GetClusterConfigResponse>send(new GetClusterConfigRequest())
.map(new Func1<GetClusterConfigResponse, Integer>() {
@Override
public Integer call(GetClusterConfigResponse response) {
CouchbaseBucketConfig conf = (CouchbaseBucketConfig) response.config().bucketConfig(bucket);
return conf.numberOfReplicas();
}
}).flatMap(new Func1<Integer, Observable<BinaryRequest>>() {
@Override
public Observable<BinaryRequest> call(Integer max) {
List<BinaryRequest> requests = new ArrayList<BinaryRequest>();