Package com.iizix.txp.impl
Class TXPPolicyImpl
- java.lang.Object
- com.iizix.txp.impl.TXPPolicyImpl
- All Implemented Interfaces:
ITXPPolicy
public class TXPPolicyImpl extends java.lang.Object implements ITXPPolicy
A (for now) very basic and crude implementation of aTXPolicy
- Author:
- Freggle
Nested Class Summary
Nested classes/interfaces inherited from interface com.iizix.txp.ITXPPolicy
ITXPPolicy.Action
Constructor Summary
Constructors Constructor Description TXPPolicyImpl()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ITXPPolicy.Action
onNodeCommitFailed(ITXProcess p, ITXPNode n)
Returns the required action on a node that failed to commit.ITXPPolicy.Action
onNodeReadyFailed(ITXProcess p, ITXPNode n)
Returns the required action on a node that failed its work.ITXPPolicy.Action
onNodeRollbackFailed(ITXProcess p, ITXPNode n)
Returns the required action on a node that failed to rollback.ITXPPolicy.Action
onNodeTimeoutSignaled(ITXProcess p, ITXPNode n)
Returns the required action on a node that timed out waiting for completion.ITXPPolicy.Action
onProcessTimeoutSignaled(ITXProcess p)
Returns the required action on a process that timed out waiting for the nodes to do the work.
Method Detail
onNodeReadyFailed
public ITXPPolicy.Action onNodeReadyFailed(ITXProcess p, ITXPNode n)
Description copied from interface:ITXPPolicy
Returns the required action on a node that failed its work.- Specified by:
onNodeReadyFailed
in interfaceITXPPolicy
- Parameters:
p
- the processn
- the node- Returns:
- the required action
onNodeCommitFailed
public ITXPPolicy.Action onNodeCommitFailed(ITXProcess p, ITXPNode n)
Description copied from interface:ITXPPolicy
Returns the required action on a node that failed to commit.- Specified by:
onNodeCommitFailed
in interfaceITXPPolicy
- Parameters:
p
- the processn
- the node- Returns:
- the required action
onNodeRollbackFailed
public ITXPPolicy.Action onNodeRollbackFailed(ITXProcess p, ITXPNode n)
Description copied from interface:ITXPPolicy
Returns the required action on a node that failed to rollback.- Specified by:
onNodeRollbackFailed
in interfaceITXPPolicy
- Parameters:
p
- the processn
- the node- Returns:
- the required action
onNodeTimeoutSignaled
public ITXPPolicy.Action onNodeTimeoutSignaled(ITXProcess p, ITXPNode n)
Description copied from interface:ITXPPolicy
Returns the required action on a node that timed out waiting for completion.- Specified by:
onNodeTimeoutSignaled
in interfaceITXPPolicy
- Parameters:
p
- the processn
- the node- Returns:
- the required action
onProcessTimeoutSignaled
public ITXPPolicy.Action onProcessTimeoutSignaled(ITXProcess p)
Description copied from interface:ITXPPolicy
Returns the required action on a process that timed out waiting for the nodes to do the work.- Specified by:
onProcessTimeoutSignaled
in interfaceITXPPolicy
- Parameters:
p
- the process- Returns:
- the required action