Package com.iizix.txp
Interface ITXPCoordinator
- All Superinterfaces:
ITXPMonitor
- All Known Implementing Classes:
TXPCoordinatorImpl
The
ITXPCoordinator interface.- Author:
- Freggle
Method Summary
Modifier and TypeMethodDescriptionvoidaddMonitor(ITXPMonitor monitor) Adds the specified TXP monitor.voidcommit(ITXProcess process) Called by the process to signal that the process logic/application requests a commit.Creates a new implementation specificITXProcessinstance and sets itself as coordinator.voidready(ITXProcess process, ITXPNode node, ITXPNode.State nodeState) Called by the process to signal that a node is ready for completion.voidremoveMonitor(ITXPMonitor monitor) Removes the specified TXP monitor.voidrollback(ITXProcess process) Called by the process to signal that the process logic/application requests a rollback.Methods inherited from interface com.iizix.txp.ITXPMonitor
getCoordinator, onBeganProcess, onCommitCanceled, onCommitInitiated, onMonitorAdded, onMonitorRemoved, onNodeAssociated, onNodeCommitFailedPolicyAction, onNodeDisassociated, onNodeReady, onNodeReadyFailedPolicyAction, onNodeRollbackFailedPolicyAction, onNodeTimeoutSignaled, onNodeTimeoutSignaledPolicyAction, onProcessCompleted, onProcessCreated, onProcessTimeoutSignaled, onProcessTimeoutSignaledPolicyAction, onRollbackCanceled, onRollbackInitiated
Method Details
newProcess
ITXProcess newProcess()Creates a new implementation specificITXProcessinstance and sets itself as coordinator.- Returns:
- an
ITXProcessinstance
ready
Called by the process to signal that a node is ready for completion. Typically the coordinator handles error states that may occur using a policy.- Parameters:
process- the processnode- the nodenodeState- the current state of the node
commit
Called by the process to signal that the process logic/application requests a commit. Typically the coordinator coordinates the commit and handles error states that may occur using a policy.- Parameters:
process- the process- Throws:
TXPException- a coordinator and policy dependent exception (today 1 of 3, more details later)
rollback
Called by the process to signal that the process logic/application requests a rollback. Typically the coordinator coordinates the commit and handles error states that may occur using a policy.- Parameters:
process- the process- Throws:
TXPException- a coordinator and policy dependent exception (today 1 of 3, more details later)
addMonitor
Adds the specified TXP monitor. Monitors can be used for logging and monitoring processes under this coordinator's control.- Parameters:
monitor- the monitor
removeMonitor
Removes the specified TXP monitor.- Parameters:
monitor- The monitor.