Search in sources :

Example 6 with InstrumentedTimelockService

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();
}
Also used : TimelockTimestampServiceAdapter(com.palantir.atlasdb.transaction.impl.TimelockTimestampServiceAdapter) LegacyTimelockService(com.palantir.lock.impl.LegacyTimelockService) TimelockService(com.palantir.lock.v2.TimelockService) InstrumentedTimelockService(com.palantir.atlasdb.transaction.impl.InstrumentedTimelockService) InstrumentedTimelockService(com.palantir.atlasdb.transaction.impl.InstrumentedTimelockService)

Aggregations

InstrumentedTimelockService (com.palantir.atlasdb.transaction.impl.InstrumentedTimelockService)6 TimelockService (com.palantir.lock.v2.TimelockService)6 Test (org.junit.Test)4 TimelockTimestampServiceAdapter (com.palantir.atlasdb.transaction.impl.TimelockTimestampServiceAdapter)1 LegacyTimelockService (com.palantir.lock.impl.LegacyTimelockService)1