Class SubordinateAtomicAction
java.lang.Object
com.arjuna.ats.arjuna.StateManager
com.arjuna.ats.arjuna.coordinator.BasicAction
com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator
com.arjuna.ats.arjuna.AtomicAction
com.arjuna.ats.internal.jta.transaction.arjunacore.AtomicAction
com.arjuna.ats.internal.jta.transaction.arjunacore.subordinate.SubordinateAtomicAction
- All Implemented Interfaces:
Reapable
- Direct Known Subclasses:
SubordinateAtomicAction
A subordinate JTA transaction; used when importing another transaction
context.
- Author:
- mcl
-
Field Summary
Fields inherited from class com.arjuna.ats.arjuna.AtomicAction
_timeout, NO_TIMEOUT
Fields inherited from class com.arjuna.ats.arjuna.coordinator.BasicAction
failedList, heuristicList, pendingList, preparedList, readonlyList, savedIntentionList, subordinate, threadStackTraceHistoryList
Fields inherited from class com.arjuna.ats.arjuna.StateManager
modifyingActions, objectModel, objectUid, synchronizationLock, usingActions
-
Constructor Summary
ModifierConstructorDescriptionSubordinateAtomicAction
(int timeout) protected
SubordinateAtomicAction
(Uid actId) For crash recovery purposes. -
Method Summary
Modifier and TypeMethodDescriptionint
abort()
Abort (rollback) the transaction.boolean
protected boolean
By default the BasicAction class only allows the termination of a transaction if it's the one currently associated with the thread.int
commit()
Commit the transaction, and have heuristic reporting.int
commit
(boolean report_heuristics) Commit the transaction.boolean
int
doCommit()
void
doForget()
Deprecated.Only called via testsint
int
int
type()
The type of the class is used to locate the state of the transaction log in the object store.Methods inherited from class com.arjuna.ats.arjuna.AtomicAction
addThread, addThread, begin, begin, cancel, end, getTimeout, removeThread, removeThread, resume, suspend
Methods inherited from class com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator
addSynchronization, afterCompletion, afterCompletion, asyncAfterCompletion, beforeCompletion, getDeferredThrowable, getSynchronizations, outputCapturedStackTraces, recordStackTraces, running, start, start
Methods inherited from class com.arjuna.ats.arjuna.coordinator.BasicAction
Abort, Abort, abortStatus, activate, activate, activeThreads, add, addChildAction, addChildThread, addChildThread, addRecord, async_prepare, Begin, childTransactions, commitStatus, createStackTraces, criticalEnd, criticalStart, Current, deactivate, destroy, doAbort, doAbort, doCommit, doCommit, doPrepare, End, equals, finalizeInternal, forgetHeuristics, getDeferredThrowables, getHeuristicDecision, getHierarchy, getSavingUid, getStore, hashCode, hierarchyDepth, insertRecord, isAncestor, maintainHeuristics, onePhaseCommit, onePhaseCommit, parent, phase2Abort, phase2Cleanup, phase2Commit, prepare, preparedStatus, preventCommit, removeChildAction, removeChildThread, removeChildThread, restore_state, save_state, setCheckedAction, setHeuristicDecision, status, topLevelAction, topLevelActionUid, toString, typeOfAction, updateHeuristic, updateState
Methods inherited from class com.arjuna.ats.arjuna.StateManager
cleanup, createLists, deactivate, deactivate, disable, forgetAction, get_uid, getCreationTimeMillis, getMutex, getObjectModel, getStoreRoot, loadObjectState, lockMutex, modified, objectType, packHeader, persist, print, rememberAction, setStatus, setupStore, setupStore, setupStore, terminate, tryLockMutex, unlockMutex, unpackHeader
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.arjuna.ats.arjuna.coordinator.Reapable
get_uid, preventCommit
-
Constructor Details
-
SubordinateAtomicAction
public SubordinateAtomicAction() -
SubordinateAtomicAction
public SubordinateAtomicAction(int timeout) -
SubordinateAtomicAction
For crash recovery purposes.- Parameters:
actId
- the identifier to recover.
-
-
Method Details
-
commit
public int commit()Commit the transaction, and have heuristic reporting. Heuristic reporting via the return code is enabled.- Overrides:
commit
in classAtomicAction
- Returns:
ActionStatus
indicating outcome.
-
commit
public int commit(boolean report_heuristics) Commit the transaction. The report_heuristics parameter can be used to determine whether or not heuristic outcomes are reported. If the transaction has already terminated, or has not begun, then an appropriate error code will be returned.- Overrides:
commit
in classAtomicAction
- Returns:
ActionStatus
indicating outcome.
-
abort
public int abort()Abort (rollback) the transaction. If the transaction has already terminated, or has not been begun, then an appropriate error code will be returned.- Overrides:
abort
in classAtomicAction
- Returns:
ActionStatus
indicating outcome.
-
type
The type of the class is used to locate the state of the transaction log in the object store. Overloads BasicAction.type()- Overrides:
type
in classAtomicAction
- Returns:
- a string representation of the hierarchy of the class for storing logs in the transaction object store.
-
doPrepare
public int doPrepare() -
doCommit
public int doCommit() -
doRollback
public int doRollback() -
doOnePhaseCommit
public int doOnePhaseCommit() -
doForget
public void doForget()Deprecated.Only called via tests -
doBeforeCompletion
public boolean doBeforeCompletion() -
checkForCurrent
protected boolean checkForCurrent()By default the BasicAction class only allows the termination of a transaction if it's the one currently associated with the thread. We override this here.- Overrides:
checkForCurrent
in classAtomicAction
- Returns:
false
to indicate that this transaction can only be terminated by the right thread.
-
activated
public boolean activated()
-