use of com.palantir.lock.client.DialogueAdaptingConjureTimelockService 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);
}
use of com.palantir.lock.client.DialogueAdaptingConjureTimelockService in project atlasdb by palantir.
the class FeedbackMetricsTest method cleanMetrics.
@Before
public void cleanMetrics() {
metrics = ConjureTimelockServiceBlockingMetrics.of(MetricsManagers.createForTests().getTaggedRegistry());
service = new DialogueAdaptingConjureTimelockService(conjureTimelockServiceBlocking, metrics);
}
Aggregations