com.arjuna.ats.arjuna.coordinator
Class TwoPhaseCoordinator
java.lang.Object
com.arjuna.ats.arjuna.StateManager
com.arjuna.ats.arjuna.coordinator.BasicAction
com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator
- All Implemented Interfaces:
- Reapable
- Direct Known Subclasses:
- AtomicAction
- public class TwoPhaseCoordinator
- extends BasicAction
- implements Reapable
Adds support for synchronizations to BasicAction. It does not change thread
associations either. It also allows any thread to terminate a transaction,
even if it is not the transaction that is marked as current for the thread
(unlike the BasicAction default).
- Since:
- JTS 3.0.
- Version:
- $Id: TwoPhaseCoordinator.java 2342 2006-03-30 13:06:17Z $
- Author:
- Mark Little (mark@arjuna.com)
Methods inherited from class com.arjuna.ats.arjuna.coordinator.BasicAction |
Abort, abortStatus, activate, activate, activeThreads, add, addChildAction, addChildThread, addChildThread, addRecord, Begin, checkForCurrent, childTransactions, commitStatus, criticalEnd, criticalStart, Current, deactivate, destroy, doAbort, doAbort, doCommit, doCommit, doPrepare, doPrepare, End, equals, finalize, forgetHeuristics, getHeuristicDecision, getHierarchy, getSavingUid, getStore, hierarchyDepth, insertRecord, isAncestor, maintainHeuristics, onePhaseCommit, parent, phase2Abort, phase2Cleanup, phase2Commit, prepare, preparedStatus, preventCommit, removeChildAction, removeChildThread, removeChildThread, restore_state, save_state, setCheckedAction, status, store, topLevelAction, topLevelActionUid, toString, typeOfAction, updateHeuristic, updateState |
Methods inherited from class com.arjuna.ats.arjuna.StateManager |
attributes, cleanup, deactivate, deactivate, disable, forgetAction, get_uid, getMutex, getStoreRoot, loadObjectState, lockMutex, modified, ObjectType, packHeader, persist, print, rememberAction, setStatus, setupStore, setupStore, terminate, tryLockMutex, unlockMutex, unpackHeader |
Methods inherited from class java.lang.Object |
clone, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TwoPhaseCoordinator
public TwoPhaseCoordinator()
TwoPhaseCoordinator
public TwoPhaseCoordinator(Uid id)
TwoPhaseCoordinator
protected TwoPhaseCoordinator(int at)
TwoPhaseCoordinator
protected TwoPhaseCoordinator(Uid u,
int at)
start
public int start()
start
public int start(BasicAction parentAction)
end
public int end(boolean report_heuristics)
cancel
public int cancel()
- Specified by:
cancel
in interface Reapable
addSynchronization
public int addSynchronization(SynchronizationRecord sr)
running
public boolean running()
- Specified by:
running
in interface Reapable
- Returns:
true
if the transaction is running,
false
otherwise.
type
public java.lang.String type()
- Overloads BasicAction.type()
- Overrides:
type
in class BasicAction
beforeCompletion
protected boolean beforeCompletion()
afterCompletion
protected boolean afterCompletion(int myStatus)