Search in sources :

Example 1 with AuxiliaryRemotingParameters

use of com.palantir.atlasdb.config.AuxiliaryRemotingParameters in project atlasdb by palantir.

the class TestProxies method singleNode.

public <T> T singleNode(TimeLockServerHolder server, Class<T> serviceInterface, boolean shouldRetry, ProxyMode proxyMode) {
    String uri = getServerUri(server, proxyMode);
    List<Object> key = ImmutableList.of(serviceInterface, uri, "single", proxyMode);
    AuxiliaryRemotingParameters parameters = shouldRetry ? TestProxyUtils.AUXILIARY_REMOTING_PARAMETERS_RETRYING : TestProxyUtils.AUXILIARY_REMOTING_PARAMETERS_NO_RETRYING;
    return (T) proxies.computeIfAbsent(key, ignored -> AtlasDbHttpClients.createProxy(Optional.of(TRUST_CONTEXT), uri, serviceInterface, parameters));
}
Also used : ImmutableServerListConfig(com.palantir.atlasdb.config.ImmutableServerListConfig) SslConfiguration(com.palantir.conjure.java.api.config.ssl.SslConfiguration) AtlasDbHttpClients(com.palantir.atlasdb.http.AtlasDbHttpClients) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) TestProxyUtils(com.palantir.atlasdb.http.TestProxyUtils) Collectors(java.util.stream.Collectors) TrustContext(com.palantir.conjure.java.config.ssl.TrustContext) ConcurrentMap(java.util.concurrent.ConcurrentMap) TestableTimelockServer(com.palantir.atlasdb.timelock.TestableTimelockServer) MetricsManagers(com.palantir.atlasdb.util.MetricsManagers) SslSocketFactories(com.palantir.conjure.java.config.ssl.SslSocketFactories) List(java.util.List) ImmutableList(com.google.common.collect.ImmutableList) Paths(java.nio.file.Paths) TimeLockServerHolder(com.palantir.atlasdb.timelock.TimeLockServerHolder) AuxiliaryRemotingParameters(com.palantir.atlasdb.config.AuxiliaryRemotingParameters) Optional(java.util.Optional) AuxiliaryRemotingParameters(com.palantir.atlasdb.config.AuxiliaryRemotingParameters)

Aggregations

ImmutableList (com.google.common.collect.ImmutableList)1 AuxiliaryRemotingParameters (com.palantir.atlasdb.config.AuxiliaryRemotingParameters)1 ImmutableServerListConfig (com.palantir.atlasdb.config.ImmutableServerListConfig)1 AtlasDbHttpClients (com.palantir.atlasdb.http.AtlasDbHttpClients)1 TestProxyUtils (com.palantir.atlasdb.http.TestProxyUtils)1 TestableTimelockServer (com.palantir.atlasdb.timelock.TestableTimelockServer)1 TimeLockServerHolder (com.palantir.atlasdb.timelock.TimeLockServerHolder)1 MetricsManagers (com.palantir.atlasdb.util.MetricsManagers)1 SslConfiguration (com.palantir.conjure.java.api.config.ssl.SslConfiguration)1 SslSocketFactories (com.palantir.conjure.java.config.ssl.SslSocketFactories)1 TrustContext (com.palantir.conjure.java.config.ssl.TrustContext)1 Paths (java.nio.file.Paths)1 List (java.util.List)1 Optional (java.util.Optional)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1 ConcurrentMap (java.util.concurrent.ConcurrentMap)1 Collectors (java.util.stream.Collectors)1