use of com.couchbase.client.core.config.refresher.KeyValueBucketRefresher.MAX_PARALLEL_FETCH in project couchbase-jvm-clients by couchbase.
the class GlobalRefresher method filterEligibleNodes.
private Flux<PortInfo> filterEligibleNodes() {
return Flux.defer(() -> {
GlobalConfig config = provider.config().globalConfig();
if (config == null) {
// todo: log debug that no node found to refresh a config from
return Flux.empty();
}
List<PortInfo> nodes = new ArrayList<>(config.portInfos());
shiftNodeList(nodes);
return Flux.fromIterable(nodes).filter(n -> n.ports().containsKey(ServiceType.KV) || n.sslPorts().containsKey(ServiceType.KV)).take(MAX_PARALLEL_FETCH);
});
}
Aggregations