ExternalDecider
An ExternalDecider
is given the final control over the decision of
whether or not to commit a transaction, which allows two-phase commit to
be integrated with a single non-transactional resource. shouldCommit
will only be called if a InTxn
has successfully called all of its
before-commit handlers, acquired all necessary write locks, validated all
of its reads and called all of its while-preparing handlers. The decider
may then attempt a non-transactional operation whose outcome is
uncertain, and based on the outcome may directly cause the transaction to
commit or roll back.
An ExternalDecider
is given the final control over the decision of
whether or not to commit a transaction, which allows two-phase commit to
be integrated with a single non-transactional resource. shouldCommit
will only be called if a InTxn
has successfully called all of its
before-commit handlers, acquired all necessary write locks, validated all
of its reads and called all of its while-preparing handlers. The decider
may then attempt a non-transactional operation whose outcome is
uncertain, and based on the outcome may directly cause the transaction to
commit or roll back.
Value members
Abstract methods
Should return true if the end-of-life transaction txn
should commit,
false if it should roll back. Txn.rollback
may also be used to
initiate a rollback if that is more convenient. Called while the
status is Prepared
. This method may not access any Ref
s, even via
Ref.single
.
Should return true if the end-of-life transaction txn
should commit,
false if it should roll back. Txn.rollback
may also be used to
initiate a rollback if that is more convenient. Called while the
status is Prepared
. This method may not access any Ref
s, even via
Ref.single
.