use of com.palantir.atlasdb.timelock.lock.LockLog in project atlasdb by palantir.
the class AsyncTimeLockServicesCreator method createTimeLockServices.
@Override
public TimeLockServices createTimeLockServices(Client client, Supplier<ManagedTimestampService> rawTimestampServiceSupplier, Supplier<LockService> rawLockServiceSupplier) {
log.info("Creating async timelock services for client {}", SafeArg.of("client", client));
LockLog maybeEnhancedLockLog = maybeEnhancedLockLog(client);
AsyncTimelockService asyncTimelockService = leadershipComponents.wrapInLeadershipProxy(client, AsyncTimelockService.class, () -> createRawAsyncTimelockService(client, rawTimestampServiceSupplier, maybeEnhancedLockLog));
AsyncTimelockResource asyncTimelockResource = new AsyncTimelockResource(maybeEnhancedLockLog, asyncTimelockService);
LockService lockService = leadershipComponents.wrapInLeadershipProxy(client, LockService.class, Suppliers.compose(NonTransactionalLockService::new, rawLockServiceSupplier::get));
return TimeLockServices.create(asyncTimelockService, lockService, asyncTimelockService, asyncTimelockResource, asyncTimelockService);
}
Aggregations