Search in sources :

Example 1 with LockLog

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);
}
Also used : LockLog(com.palantir.atlasdb.timelock.lock.LockLog) AsyncTimelockResource(com.palantir.atlasdb.timelock.AsyncTimelockResource) NonTransactionalLockService(com.palantir.atlasdb.timelock.lock.NonTransactionalLockService) LockService(com.palantir.lock.LockService) AsyncLockService(com.palantir.atlasdb.timelock.lock.AsyncLockService) AsyncTimelockService(com.palantir.atlasdb.timelock.AsyncTimelockService)

Aggregations

AsyncTimelockResource (com.palantir.atlasdb.timelock.AsyncTimelockResource)1 AsyncTimelockService (com.palantir.atlasdb.timelock.AsyncTimelockService)1 AsyncLockService (com.palantir.atlasdb.timelock.lock.AsyncLockService)1 LockLog (com.palantir.atlasdb.timelock.lock.LockLog)1 NonTransactionalLockService (com.palantir.atlasdb.timelock.lock.NonTransactionalLockService)1 LockService (com.palantir.lock.LockService)1