use of com.palantir.atlasdb.http.v2.RemoteServiceConfiguration in project atlasdb by palantir.
the class BroadcastDialogueClientFactory method create.
public static BroadcastDialogueClientFactory create(DialogueClients.ReloadingFactory baseFactory, Refreshable<ServerListConfig> serverListConfigSupplier, UserAgent userAgent, AuxiliaryRemotingParameters parameters) {
UserAgent versionedAgent = userAgent.addAgent(AtlasDbRemotingConstants.ATLASDB_HTTP_CLIENT_AGENT);
Refreshable<Map<String, RemoteServiceConfiguration>> timeLockRemoteConfigurations = serverListConfigSupplier.map(serverListConfig -> createRemoteServiceConfigurations(serverListConfig, versionedAgent, parameters));
DialogueClients.ReloadingFactory reloadingFactory = baseFactory.reloading(timeLockRemoteConfigurations.map(DialogueClientOptions::toServicesConfigBlock)).withUserAgent(versionedAgent);
return new BroadcastDialogueClientFactory(reloadingFactory, serverListConfigSupplier);
}
use of com.palantir.atlasdb.http.v2.RemoteServiceConfiguration in project atlasdb by palantir.
the class TimeLockDialogueServiceProvider method create.
public static TimeLockDialogueServiceProvider create(TaggedMetricRegistry taggedMetricRegistry, DialogueClients.ReloadingFactory baseFactory, ServerListConfig serverListConfig, AuxiliaryRemotingParameters parameters) {
UserAgent versionedAgent = parameters.userAgent().addAgent(AtlasDbRemotingConstants.ATLASDB_HTTP_CLIENT_AGENT);
Map<String, RemoteServiceConfiguration> remoteServiceConfigurations = createRemoteServiceConfigurations(serverListConfig, versionedAgent, parameters);
DialogueClients.ReloadingFactory reloadingFactory = decorate(baseFactory, Refreshable.only(remoteServiceConfigurations)).withUserAgent(versionedAgent);
return new TimeLockDialogueServiceProvider(reloadingFactory, taggedMetricRegistry);
}
Aggregations