use of com.yahoo.vespa.jaxrs.client.NoRetryJaxRsStrategy in project vespa by vespa-engine.
the class SingleInstanceClusterControllerClientFactory method createClient.
@Override
public ClusterControllerClient createClient(List<HostName> clusterControllers, String clusterName) {
if (clusterControllers.isEmpty()) {
throw new IllegalArgumentException("No cluster controller instances found");
}
HostName controllerHostName = clusterControllers.iterator().next();
// TODO: Get this from service monitor.
int port = CLUSTERCONTROLLER_HARDCODED_PORT;
log.log(LogLevel.DEBUG, () -> "For cluster '" + clusterName + "' with controllers " + clusterControllers + ", creating api client for " + controllerHostName.s() + ":" + port);
JaxRsStrategy<ClusterControllerJaxRsApi> strategy = new NoRetryJaxRsStrategy<>(controllerHostName, port, jaxRsClientFactory, ClusterControllerJaxRsApi.class, CLUSTERCONTROLLER_API_PATH, CLUSTERCONTROLLER_HARDCODED_SCHEME);
return new ClusterControllerClientImpl(strategy, clusterName);
}
Aggregations