use of com.couchbase.client.core.msg.kv.CarrierGlobalConfigRequest in project couchbase-jvm-clients by couchbase.
the class GlobalRefresher method attemptUpdateGlobalConfig.
private Flux<ProposedGlobalConfigContext> attemptUpdateGlobalConfig(final Flux<PortInfo> nodes) {
return nodes.flatMap(nodeInfo -> {
CoreContext ctx = core.context();
CarrierGlobalConfigRequest request = new CarrierGlobalConfigRequest(configRequestTimeout, ctx, FailFastRetryStrategy.INSTANCE, nodeInfo.identifier());
core.send(request);
return Reactor.wrap(request, request.response(), true).filter(response -> {
// TODO: debug event that it got ignored.
return response.status().success();
}).map(response -> new ProposedGlobalConfigContext(new String(response.content(), UTF_8), nodeInfo.hostname())).onErrorResume(t -> {
// TODO: raise a warning that fetching a config individual failed.
return Mono.empty();
});
});
}
Aggregations