本文整理了Java中com.palantir.atlasdb.transaction.api.TransactionManager.finishRunTaskWithLockThrowOnConflict()
方法的一些代码示例,展示了TransactionManager.finishRunTaskWithLockThrowOnConflict()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TransactionManager.finishRunTaskWithLockThrowOnConflict()
方法的具体详情如下:
包路径:com.palantir.atlasdb.transaction.api.TransactionManager
类名称:TransactionManager
方法名:finishRunTaskWithLockThrowOnConflict
[英]Runs a provided task, commits the transaction, and performs cleanup associated with a transaction created by #setupRunTaskWithConditionThrowOnConflict(PreCommitCondition). If no further work needs to be done with the transaction, a no-op task can be passed in.
[中]运行提供的任务,提交事务,并执行与#setupRunTaskWithConditionThrowOnConflict(预提交条件)创建的事务关联的清理。如果不需要对事务执行进一步的工作,则可以传入一个无操作任务。
代码示例来源:origin: palantir/atlasdb
@Override
public void commit(TransactionToken token) {
TransactionAndImmutableTsLock txAndLock = transactions.getIfPresent(token);
if (txAndLock != null) {
txManager.finishRunTaskWithLockThrowOnConflict(txAndLock, (TxTask) transaction -> null);
transactions.invalidate(token);
}
}
代码示例来源:origin: palantir/atlasdb
@Override
public void abort(TransactionToken token) {
TransactionAndImmutableTsLock txAndLock = transactions.getIfPresent(token);
if (txAndLock != null) {
txManager.finishRunTaskWithLockThrowOnConflict(txAndLock, (TxTask) transaction -> {
transaction.abort();
return null;
});
transactions.invalidate(token);
}
}
代码示例来源:origin: com.palantir.atlasdb/atlasdb-service
@Override
public void commit(TransactionToken token) {
TransactionAndImmutableTsLock txAndLock = transactions.getIfPresent(token);
if (txAndLock != null) {
txManager.finishRunTaskWithLockThrowOnConflict(txAndLock, (TxTask) transaction -> null);
transactions.invalidate(token);
}
}
代码示例来源:origin: com.palantir.atlasdb/atlasdb-service
@Override
public void abort(TransactionToken token) {
TransactionAndImmutableTsLock txAndLock = transactions.getIfPresent(token);
if (txAndLock != null) {
txManager.finishRunTaskWithLockThrowOnConflict(txAndLock, (TxTask) transaction -> {
transaction.abort();
return null;
});
transactions.invalidate(token);
}
}
内容来源于网络,如有侵权,请联系作者删除!