Package com.iizix.txp
Interface ITXPMonitor
- All Known Subinterfaces:
ITXPCoordinator
- All Known Implementing Classes:
TXPCoordinatorImpl
public interface ITXPMonitor- Author:
- Freggle
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ITXPCoordinatorgetCoordinator()Returns the coordinatorvoidonBeganProcess(ITXProcess process)Called when a process created and associated with he controllervoidonCommitCanceled(ITXProcess process, TXPException reason)Called when the process aborts committing.voidonCommitInitiated(ITXProcess process)Called when a process is called to attempt a commitvoidonMonitorAdded(ITXPMonitor monitor)Called when a monitor is added to the coordinator's monitor chainvoidonMonitorRemoved(ITXPMonitor monitor)Called when a monitor is removed from the coordinator's monitor chainvoidonNodeAssociated(ITXProcess process, ITXPNode node, ITXPNode.State returnedState)Called when a node is associated with a processvoidonNodeCommitFailedPolicyAction(ITXProcess process, ITXPNode node, ITXPPolicy.Action action)Called when the policy action is determined for a node that failed to commitvoidonNodeDisassociated(ITXProcess process, ITXPNode node)Called when a node is disassociated from a processvoidonNodeReady(ITXProcess process, ITXPNode node, ITXPNode.State returnedState)Called when a node has finished doing the work neededvoidonNodeReadyFailedPolicyAction(ITXProcess process, ITXPNode node, ITXPPolicy.Action action)Called when the policy action is determined for a node that failed processingvoidonNodeRollbackFailedPolicyAction(ITXProcess process, ITXPNode node, ITXPPolicy.Action action)Called when the policy action is determined for a node that failed to rollbackvoidonNodeTimeoutSignaled(ITXProcess process, ITXPNode node)Called when a node indicates it timed out waiting on the process.voidonNodeTimeoutSignaledPolicyAction(ITXProcess process, ITXPNode node, ITXPPolicy.Action action)Called when the policy action is determined for a node that timed out waiting for completion.voidonProcessCompleted(ITXProcess process)Called when a process has been completed (either committed or rolled back)voidonProcessCreated(ITXProcess process)Called when the process is created.voidonProcessTimeoutSignaled(ITXProcess process)Called when a process indicates it timed out waiting on the nodesvoidonProcessTimeoutSignaledPolicyAction(ITXProcess process, ITXPPolicy.Action action)Called when the policy action is determined for a process that timed out waiting for the nodes to do the work.voidonRollbackCanceled(ITXProcess process, TXPException reason)Called when the process aborts rolling back.voidonRollbackInitiated(ITXProcess process)Called when a process is called to attempt a rollback
Method Detail
onProcessCreated
void onProcessCreated(ITXProcess process)
Called when the process is created.- Parameters:
process- The process.
getCoordinator
ITXPCoordinator getCoordinator()
Returns the coordinator- Returns:
- the coordinator
onMonitorAdded
void onMonitorAdded(ITXPMonitor monitor)
Called when a monitor is added to the coordinator's monitor chain- Parameters:
monitor- the monitor that got added
onMonitorRemoved
void onMonitorRemoved(ITXPMonitor monitor)
Called when a monitor is removed from the coordinator's monitor chain- Parameters:
monitor- the monitor that got removed
onBeganProcess
void onBeganProcess(ITXProcess process)
Called when a process created and associated with he controller- Parameters:
process- the process
onNodeAssociated
void onNodeAssociated(ITXProcess process, ITXPNode node, ITXPNode.State returnedState)
Called when a node is associated with a process- Parameters:
process- the processnode- the nodereturnedState- the returned node state
onNodeDisassociated
void onNodeDisassociated(ITXProcess process, ITXPNode node)
Called when a node is disassociated from a process- Parameters:
process- the processnode- the node
onNodeReady
void onNodeReady(ITXProcess process, ITXPNode node, ITXPNode.State returnedState)
Called when a node has finished doing the work needed- Parameters:
process- the processnode- the nodereturnedState- the node state after attempting to do the work
onNodeTimeoutSignaled
void onNodeTimeoutSignaled(ITXProcess process, ITXPNode node)
Called when a node indicates it timed out waiting on the process.- Parameters:
process- the processnode- the node
onProcessTimeoutSignaled
void onProcessTimeoutSignaled(ITXProcess process)
Called when a process indicates it timed out waiting on the nodes- Parameters:
process- the process
onCommitInitiated
void onCommitInitiated(ITXProcess process)
Called when a process is called to attempt a commit- Parameters:
process- the process
onCommitCanceled
void onCommitCanceled(ITXProcess process, TXPException reason)
Called when the process aborts committing. This can happen if a rollback is requested or one or more nodes have not yet finished processing.- Parameters:
process- the processreason- the exception thrown by the commit
onRollbackInitiated
void onRollbackInitiated(ITXProcess process)
Called when a process is called to attempt a rollback- Parameters:
process- the process
onRollbackCanceled
void onRollbackCanceled(ITXProcess process, TXPException reason)
Called when the process aborts rolling back. This can happen if one or more nodes have not yet finished processing.- Parameters:
process- the processreason- the exception thrown by the rollback
onNodeReadyFailedPolicyAction
void onNodeReadyFailedPolicyAction(ITXProcess process, ITXPNode node, ITXPPolicy.Action action)
Called when the policy action is determined for a node that failed processing- Parameters:
process- the processnode- the nodeaction- the policy action
onNodeCommitFailedPolicyAction
void onNodeCommitFailedPolicyAction(ITXProcess process, ITXPNode node, ITXPPolicy.Action action)
Called when the policy action is determined for a node that failed to commit- Parameters:
process- the processnode- the nodeaction- the action
onNodeRollbackFailedPolicyAction
void onNodeRollbackFailedPolicyAction(ITXProcess process, ITXPNode node, ITXPPolicy.Action action)
Called when the policy action is determined for a node that failed to rollback- Parameters:
process- the processnode- the nodeaction- the action
onNodeTimeoutSignaledPolicyAction
void onNodeTimeoutSignaledPolicyAction(ITXProcess process, ITXPNode node, ITXPPolicy.Action action)
Called when the policy action is determined for a node that timed out waiting for completion.- Parameters:
process- the processnode- the nodeaction- the action
onProcessTimeoutSignaledPolicyAction
void onProcessTimeoutSignaledPolicyAction(ITXProcess process, ITXPPolicy.Action action)
Called when the policy action is determined for a process that timed out waiting for the nodes to do the work.- Parameters:
process- the processaction- the action
onProcessCompleted
void onProcessCompleted(ITXProcess process)
Called when a process has been completed (either committed or rolled back)- Parameters:
process- The process.