use of com.palantir.atlasdb.transaction.impl.InstrumentedTimelockService in project atlasdb by palantir.
the class TransactionManagers method withRequestBatchingTimestampService.
private static LockAndTimestampServices withRequestBatchingTimestampService(java.util.function.Supplier<TimestampClientConfig> timestampClientConfigSupplier, LockAndTimestampServices lockAndTimestampServices) {
TimelockService timelockServiceWithBatching = DecoratedTimelockServices.createTimelockServiceWithTimestampBatching(lockAndTimestampServices.timelock(), timestampClientConfigSupplier);
TimelockService instrumentedTimelockService = new InstrumentedTimelockService(timelockServiceWithBatching, AtlasDbMetrics.getMetricRegistry());
return ImmutableLockAndTimestampServices.builder().from(lockAndTimestampServices).timestamp(new TimelockTimestampServiceAdapter(timelockServiceWithBatching)).timelock(instrumentedTimelockService).build();
}
Aggregations