Class AssumedCompleteHeuristicTransaction
java.lang.Object
com.arjuna.ats.arjuna.StateManager
com.arjuna.ats.arjuna.coordinator.BasicAction
com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator
com.arjuna.ats.internal.jts.orbspecific.coordinator.ArjunaTransactionImple
com.arjuna.ats.internal.jts.recovery.transactions.RecoveredTransaction
com.arjuna.ats.internal.jts.recovery.transactions.AssumedCompleteHeuristicTransaction
- All Implemented Interfaces:
ArjunaTransactionOperations
,UidCoordinatorOperations
,Reapable
,RecoveringTransaction
,CoordinatorOperations
,TerminatorOperations
- Author:
- Gytis Trikleris
-
Field Summary
Fields inherited from class com.arjuna.ats.internal.jts.recovery.transactions.RecoveredTransaction
_originalProcessUid
Fields inherited from class com.arjuna.ats.internal.jts.orbspecific.coordinator.ArjunaTransactionImple
controlHandle, parentTransaction
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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Tell transaction it is assumed to be complete and should convert itself to the appropriate assumed complete type.do not admit to being inactiveboolean
restore_state
(InputObjectState objectState, int ot) This assumes the various lists are zero length when it is called.boolean
save_state
(OutputObjectState objectState, int ot) Redefined version of save_state and restore_state from StateManager.toString()
Overloads Object.toString()type()
Overloads BasicAction.type()static String
typeName()
Methods inherited from class com.arjuna.ats.internal.jts.recovery.transactions.RecoveredTransaction
addResourceRecord, allCompleted, get_status, getRecoveryStatus, packHeader, removeOldStoreEntry, replayPhase2, unpackHeader
Methods inherited from class com.arjuna.ats.internal.jts.orbspecific.coordinator.ArjunaTransactionImple
commit, create_subtransaction, createOTSRecord, createOTSRecord, destroyAction, doAfterCompletion, doBeforeCompletion, equals, finalize, forgetHeuristics, get_parent_status, get_top_level_status, get_transaction_name, get_txcontext, getControlHandle, getSynchronizations, hash_top_level_tran, hash_transaction, interpositionType, is_ancestor_transaction, is_descendant_transaction, is_related_transaction, is_same_transaction, is_top_level_transaction, register_resource, register_subtran_aware, register_synchronization, rollback, rollback_only, setControlHandle, topLevelUid, uid
Methods inherited from class com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator
addSynchronization, afterCompletion, afterCompletion, asyncAfterCompletion, beforeCompletion, cancel, end, getDeferredThrowable, 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, checkForCurrent, childTransactions, commitStatus, createStackTraces, criticalEnd, criticalStart, Current, deactivate, destroy, doAbort, doAbort, doCommit, doCommit, doPrepare, End, finalizeInternal, getDeferredThrowables, getHeuristicDecision, getHierarchy, getSavingUid, getStore, hashCode, hierarchyDepth, insertRecord, isAncestor, maintainHeuristics, onePhaseCommit, onePhaseCommit, parent, phase2Abort, phase2Cleanup, phase2Commit, prepare, preparedStatus, preventCommit, removeChildAction, removeChildThread, removeChildThread, setCheckedAction, setHeuristicDecision, status, topLevelAction, topLevelActionUid, 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, persist, print, rememberAction, setStatus, setupStore, setupStore, setupStore, terminate, tryLockMutex, unlockMutex
Methods inherited from interface com.arjuna.ats.arjuna.coordinator.Reapable
get_uid, preventCommit
-
Constructor Details
-
AssumedCompleteHeuristicTransaction
-
-
Method Details
-
typeName
-
getOriginalStatus
- Specified by:
getOriginalStatus
in interfaceRecoveringTransaction
- Overrides:
getOriginalStatus
in classRecoveredTransaction
-
type
Description copied from class:TwoPhaseCoordinator
Overloads BasicAction.type()- Specified by:
type
in interfaceRecoveringTransaction
- Overrides:
type
in classRecoveredTransaction
-
toString
Description copied from class:BasicAction
Overloads Object.toString()- Overrides:
toString
in classArjunaTransactionImple
-
assumeComplete
public boolean assumeComplete()Description copied from interface:RecoveringTransaction
Tell transaction it is assumed to be complete and should convert itself to the appropriate assumed complete type.- Specified by:
assumeComplete
in interfaceRecoveringTransaction
- Overrides:
assumeComplete
in classRecoveredTransaction
-
getLastActiveTime
Description copied from class:RecoveredTransaction
do not admit to being inactive- Specified by:
getLastActiveTime
in interfaceRecoveringTransaction
- Overrides:
getLastActiveTime
in classRecoveredTransaction
-
restore_state
Description copied from class:BasicAction
This assumes the various lists are zero length when it is called.- Overrides:
restore_state
in classBasicAction
- Returns:
true
if successful,false
otherwise.
-
save_state
Description copied from class:BasicAction
Redefined version of save_state and restore_state from StateManager. Normal operation (no crashes): BasicAction.save_state is called after a successful prepare. This causes and BasicAction object to be saved in the object store. This object contains primarily the "intentions list" of the BasicAction. After successfully completing phase 2 of the commit protocol, the BasicAction object is deleted from the store. Failure cases: If a server crashes after successfully preparing, then upon recovery the action must be resolved (either committed or aborted) depending upon whether the co-ordinating atomic action committed or aborted. Upon server recovery, the crash recovery mechanism detects ServerBasicAction objects in the object store and attempts to activate the BasicAction object of the co-ordinating action. If this is successful then the SAA is committed else aborted. If, when processing phase 2 of the commit protocol, the co-ordinator experiences a failure to commit from one of the records then the BasicAction object is NOT deleted. It is rewritten when a new state which contains a list of the records that failed during phase 2 commit. This list is called the "failedList". The crash recovery manager will detect local BasicAction objects in addition to SAA objects in the objectstore. An attempt will be made to commit these actions. If the action contained a call to a now dead server, this action can never be resolved and the AA object can never be removed. However, if the action is purely local then after the processing is complete the removed by crash recovery.- Overrides:
save_state
in classRecoveredTransaction
- Returns:
true
if successful,false
otherwise.
-