TwoPhaseCommitTool

A utility for executing 2-phase commit on several objects.

See also

Types

Link copied to clipboard
class CommitFailException(cause: Throwable, obj: TwoPhaseCommit?) : IOException

Thrown by TwoPhaseCommitTool.execute when an object fails to commit().

Link copied to clipboard
class PrepareCommitFailException(cause: Throwable, obj: TwoPhaseCommit?) : IOException

Thrown by TwoPhaseCommitTool.execute when an object fails to prepareCommit().

Functions

Link copied to clipboard
fun execute(vararg objects: TwoPhaseCommit?)

Executes a 2-phase commit algorithm by first TwoPhaseCommit.prepareCommit all objects and only if all succeed, it proceeds with TwoPhaseCommit.commit. If any of the objects fail on either the preparation or actual commit, it terminates and all of them.