Search in sources :

Example 1 with TimeoutSensitiveConjureTimelockService

use of com.palantir.atlasdb.factory.timelock.TimeoutSensitiveConjureTimelockService in project atlasdb by palantir.

the class AtlasDbDialogueServiceProvider method getConjureTimelockService.

public ConjureTimelockService getConjureTimelockService() {
    ConjureTimelockServiceBlocking longTimeoutService = dialogueClientFactory.get(ConjureTimelockServiceBlocking.class, TIMELOCK_LONG_TIMEOUT);
    ConjureTimelockServiceBlocking shortTimeoutService = dialogueClientFactory.get(ConjureTimelockServiceBlocking.class, TIMELOCK_SHORT_TIMEOUT);
    ConjureTimelockServiceBlockingMetrics conjureTimelockServiceBlockingMetrics = ConjureTimelockServiceBlockingMetrics.of(taggedMetricRegistry);
    ShortAndLongTimeoutServices<ConjureTimelockService> shortAndLongTimeoutServices = ImmutableShortAndLongTimeoutServices.<ConjureTimelockServiceBlocking>builder().longTimeout(longTimeoutService).shortTimeout(shortTimeoutService).build().map(proxy -> wrapInProxy(ConjureTimelockServiceBlocking.class, proxy)).map(service -> AtlasDbMetrics.instrumentWithTaggedMetrics(taggedMetricRegistry, ConjureTimelockServiceBlocking.class, service)).map(instrumentedService -> new DialogueAdaptingConjureTimelockService(instrumentedService, conjureTimelockServiceBlockingMetrics));
    return new TimeoutSensitiveConjureTimelockService(shortAndLongTimeoutServices);
}
Also used : ImmutableRemoteServiceConfiguration(com.palantir.atlasdb.http.v2.ImmutableRemoteServiceConfiguration) RemoteServiceConfiguration(com.palantir.atlasdb.http.v2.RemoteServiceConfiguration) AtlasDbMetrics(com.palantir.atlasdb.util.AtlasDbMetrics) AtlasDbHttpProtocolVersion(com.palantir.atlasdb.http.AtlasDbHttpProtocolVersion) ShortAndLongTimeoutServices(com.palantir.atlasdb.factory.timelock.ShortAndLongTimeoutServices) ConjureTimelockService(com.palantir.atlasdb.timelock.api.ConjureTimelockService) TimestampManagementRpcClient(com.palantir.timestamp.TimestampManagementRpcClient) TimeoutSensitiveLockRpcClient(com.palantir.atlasdb.factory.timelock.TimeoutSensitiveLockRpcClient) ClientConfiguration(com.palantir.conjure.java.client.config.ClientConfiguration) DialogueAdaptingTimeLockManagementService(com.palantir.atlasdb.backup.DialogueAdaptingTimeLockManagementService) ConjureTimelockServiceBlocking(com.palantir.atlasdb.timelock.api.ConjureTimelockServiceBlocking) TimeoutSensitiveConjureTimelockService(com.palantir.atlasdb.factory.timelock.TimeoutSensitiveConjureTimelockService) TimeLockManagementService(com.palantir.atlasdb.timelock.api.management.TimeLockManagementService) SafeArg(com.palantir.logsafe.SafeArg) NodeSelectionStrategy(com.palantir.conjure.java.client.config.NodeSelectionStrategy) ConjureLockWatchingServiceBlocking(com.palantir.atlasdb.timelock.lock.watch.ConjureLockWatchingServiceBlocking) UserAgent(com.palantir.conjure.java.api.config.service.UserAgent) Map(java.util.Map) AuxiliaryRemotingParameters(com.palantir.atlasdb.config.AuxiliaryRemotingParameters) TimelockRpcClient(com.palantir.lock.v2.TimelockRpcClient) DialogueAdaptingConjureTimelockService(com.palantir.lock.client.DialogueAdaptingConjureTimelockService) Refreshable(com.palantir.refreshable.Refreshable) MultiClientConjureTimelockServiceBlocking(com.palantir.atlasdb.timelock.api.MultiClientConjureTimelockServiceBlocking) ImmutableMap(com.google.common.collect.ImmutableMap) RetryOnSocketTimeoutExceptionProxy(com.palantir.atlasdb.http.v2.RetryOnSocketTimeoutExceptionProxy) ReloadingFactory(com.palantir.dialogue.clients.DialogueClients.ReloadingFactory) AtlasDbHttpClients(com.palantir.atlasdb.http.AtlasDbHttpClients) DialogueComposingLockRpcClient(com.palantir.lock.client.DialogueComposingLockRpcClient) Set(java.util.Set) FastFailoverProxy(com.palantir.atlasdb.http.v2.FastFailoverProxy) UnknownRemoteDebuggingProxy(com.palantir.atlasdb.http.v2.UnknownRemoteDebuggingProxy) Channel(com.palantir.dialogue.Channel) ConjureTimelockServiceBlockingMetrics(com.palantir.lock.client.ConjureTimelockServiceBlockingMetrics) TaggedMetricRegistry(com.palantir.tritium.metrics.registry.TaggedMetricRegistry) ServerListConfig(com.palantir.atlasdb.config.ServerListConfig) ConjureLockV1ServiceBlocking(com.palantir.lock.ConjureLockV1ServiceBlocking) LockRpcClient(com.palantir.lock.LockRpcClient) AtlasDbRemotingConstants(com.palantir.atlasdb.http.AtlasDbRemotingConstants) ImmutableShortAndLongTimeoutServices(com.palantir.atlasdb.factory.timelock.ImmutableShortAndLongTimeoutServices) DialogueClients(com.palantir.dialogue.clients.DialogueClients) TimeLockManagementServiceBlocking(com.palantir.atlasdb.timelock.api.management.TimeLockManagementServiceBlocking) DialogueClientOptions(com.palantir.atlasdb.http.v2.DialogueClientOptions) TimeoutSensitiveConjureTimelockService(com.palantir.atlasdb.factory.timelock.TimeoutSensitiveConjureTimelockService) DialogueAdaptingConjureTimelockService(com.palantir.lock.client.DialogueAdaptingConjureTimelockService) ConjureTimelockServiceBlockingMetrics(com.palantir.lock.client.ConjureTimelockServiceBlockingMetrics) ConjureTimelockService(com.palantir.atlasdb.timelock.api.ConjureTimelockService) TimeoutSensitiveConjureTimelockService(com.palantir.atlasdb.factory.timelock.TimeoutSensitiveConjureTimelockService) DialogueAdaptingConjureTimelockService(com.palantir.lock.client.DialogueAdaptingConjureTimelockService) ConjureTimelockServiceBlocking(com.palantir.atlasdb.timelock.api.ConjureTimelockServiceBlocking) MultiClientConjureTimelockServiceBlocking(com.palantir.atlasdb.timelock.api.MultiClientConjureTimelockServiceBlocking)

Aggregations

ImmutableMap (com.google.common.collect.ImmutableMap)1 DialogueAdaptingTimeLockManagementService (com.palantir.atlasdb.backup.DialogueAdaptingTimeLockManagementService)1 AuxiliaryRemotingParameters (com.palantir.atlasdb.config.AuxiliaryRemotingParameters)1 ServerListConfig (com.palantir.atlasdb.config.ServerListConfig)1 ImmutableShortAndLongTimeoutServices (com.palantir.atlasdb.factory.timelock.ImmutableShortAndLongTimeoutServices)1 ShortAndLongTimeoutServices (com.palantir.atlasdb.factory.timelock.ShortAndLongTimeoutServices)1 TimeoutSensitiveConjureTimelockService (com.palantir.atlasdb.factory.timelock.TimeoutSensitiveConjureTimelockService)1 TimeoutSensitiveLockRpcClient (com.palantir.atlasdb.factory.timelock.TimeoutSensitiveLockRpcClient)1 AtlasDbHttpClients (com.palantir.atlasdb.http.AtlasDbHttpClients)1 AtlasDbHttpProtocolVersion (com.palantir.atlasdb.http.AtlasDbHttpProtocolVersion)1 AtlasDbRemotingConstants (com.palantir.atlasdb.http.AtlasDbRemotingConstants)1 DialogueClientOptions (com.palantir.atlasdb.http.v2.DialogueClientOptions)1 FastFailoverProxy (com.palantir.atlasdb.http.v2.FastFailoverProxy)1 ImmutableRemoteServiceConfiguration (com.palantir.atlasdb.http.v2.ImmutableRemoteServiceConfiguration)1 RemoteServiceConfiguration (com.palantir.atlasdb.http.v2.RemoteServiceConfiguration)1 RetryOnSocketTimeoutExceptionProxy (com.palantir.atlasdb.http.v2.RetryOnSocketTimeoutExceptionProxy)1 UnknownRemoteDebuggingProxy (com.palantir.atlasdb.http.v2.UnknownRemoteDebuggingProxy)1 ConjureTimelockService (com.palantir.atlasdb.timelock.api.ConjureTimelockService)1 ConjureTimelockServiceBlocking (com.palantir.atlasdb.timelock.api.ConjureTimelockServiceBlocking)1 MultiClientConjureTimelockServiceBlocking (com.palantir.atlasdb.timelock.api.MultiClientConjureTimelockServiceBlocking)1