Exemplo n.º 1
0
 private ClientConfig getConfigFor(ClientInfo clientInfo) {
   // take the first executor defined in the config
   return settings
       .getExecutors()
       .stream()
       .filter(ex -> clientInfo.executors().containsKey(ex))
       .findFirst()
       .map(executor -> getConfig(executor, clientInfo))
       .orElseGet(
           () -> {
             log.error("client has reported unsupported executors: {} ", clientInfo.executors());
             return ClientConfig.empty();
           });
 }