Search in sources :

Example 1 with LockServiceImpl

use of com.palantir.lock.impl.LockServiceImpl in project atlasdb by palantir.

the class LockCreator method createTimeLimitedLockService.

private CloseableLockService createTimeLimitedLockService(long slowLogTriggerMillis) {
    LockServerOptions lockServerOptions = LockServerOptions.builder().slowLogTriggerMillis(slowLogTriggerMillis).build();
    LockServiceImpl rawLockService = LockServiceImpl.create(lockServerOptions);
    if (deprecated.useLockTimeLimiter()) {
        return BlockingTimeLimitedLockService.create(rawLockService, deprecated.blockingTimeoutInMs());
    }
    return rawLockService;
}
Also used : LockServerOptions(com.palantir.lock.LockServerOptions) LockServiceImpl(com.palantir.lock.impl.LockServiceImpl)

Aggregations

LockServerOptions (com.palantir.lock.LockServerOptions)1 LockServiceImpl (com.palantir.lock.impl.LockServiceImpl)1