use of com.palantir.atlasdb.persistentlock.CheckAndSetExceptionMapper in project atlasdb by palantir.
the class TransactionManagers method createAndRegisterPersistentLockService.
private static PersistentLockService createAndRegisterPersistentLockService(KeyValueService kvs, Consumer<Object> env, boolean initializeAsync) {
if (!kvs.supportsCheckAndSet()) {
return new NoOpPersistentLockService();
}
PersistentLockService pls = KvsBackedPersistentLockService.create(kvs, initializeAsync);
env.accept(pls);
env.accept(new CheckAndSetExceptionMapper());
return pls;
}
Aggregations