Merge branch '2.0.12-SNAPSHOT' into develop
This commit is contained in:
commit
62e2e75dfc
1 changed files with 46 additions and 44 deletions
|
@ -38,11 +38,12 @@ public class UnitOfWork {
|
||||||
* committed or not.
|
* committed or not.
|
||||||
*
|
*
|
||||||
* @return a function from which to chain work that only happens when commit is successful
|
* @return a function from which to chain work that only happens when commit is successful
|
||||||
* @throws ConflictingUnitOfWorkException
|
* @throws ConflictingUnitOfWorkException when the work overlaps with other concurrent writers.
|
||||||
* when the work overlaps with other concurrent writers.
|
|
||||||
*/
|
*/
|
||||||
public Function<Void, Void> commit() throws ConflictingUnitOfWorkException {
|
public Function<Void, Void> commit() throws ConflictingUnitOfWorkException {
|
||||||
|
if (nested != null) {
|
||||||
nested.forEach((uow) -> Errors.rethrow().wrap(uow::commit));
|
nested.forEach((uow) -> Errors.rethrow().wrap(uow::commit));
|
||||||
|
}
|
||||||
// log.record(txn::provisionalCommit)
|
// log.record(txn::provisionalCommit)
|
||||||
// examine log for conflicts in read-set and write-set between begin and provisional commit
|
// examine log for conflicts in read-set and write-set between begin and provisional commit
|
||||||
// if (conflict) { throw new ConflictingUnitOfWorkException(this) }
|
// if (conflict) { throw new ConflictingUnitOfWorkException(this) }
|
||||||
|
@ -63,3 +64,4 @@ public class UnitOfWork {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
:q
|
Loading…
Reference in a new issue