|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.arjuna.ats.arjuna.StateManager
com.arjuna.ats.arjuna.coordinator.BasicAction
com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator
com.arjuna.ats.arjuna.AtomicAction
This is a user-level transaction class, unlike BasicAction. AtomicAction takes care of thread-to-action scoping. This is a "one-shot" object, i.e., once terminated, the instance cannot be re-used for another transaction. An instance of this class is a transaction that can be started and terminated (either committed or rolled back). There are also methods to allow participants (AbstractRecords) to be enlisted with the transaction and to associate/disassociate threads with the transaction.
| Field Summary | |
static int |
NO_TIMEOUT
|
| Fields inherited from class com.arjuna.ats.arjuna.coordinator.BasicAction |
failedList, heuristicList, pendingList, preparedList, readonlyList, savedIntentionList |
| Fields inherited from class com.arjuna.ats.arjuna.StateManager |
modifyingActions, objectName, objectUid, smAttributes, usingActions |
| Constructor Summary | |
|
AtomicAction()
Create a new transaction. |
protected |
AtomicAction(int at)
Create a new transaction of the specified type. |
|
AtomicAction(Uid objUid)
AtomicAction constructor with a Uid. |
| Method Summary | |
int |
abort()
Abort (rollback) the transaction. |
boolean |
addThread()
Register the current thread with the transaction. |
boolean |
addThread(java.lang.Thread t)
Register the specified thread with the transaction. |
int |
begin()
Start the transaction running. |
int |
begin(int timeout)
Start the transaction running. |
int |
cancel()
|
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. |
int |
commit()
Commit the transaction, and have heuristic reporting. |
int |
commit(boolean report_heuristics)
Commit the transaction. |
int |
end(boolean report_heuristics)
|
void |
finalize()
AtomicAction destructor. |
int |
getTimeout()
|
boolean |
removeThread()
Unregister the current thread from the transaction. |
boolean |
removeThread(java.lang.Thread t)
Unregister the specified thread from the transaction. |
static boolean |
resume(AtomicAction act)
Resume transaction association on the current thread. |
static AtomicAction |
suspend()
Suspend all transaction association from the invoking thread. |
java.lang.String |
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.coordinator.TwoPhaseCoordinator |
addSynchronization, afterCompletion, beforeCompletion, getDeferredThrowable, running, start, start |
| Methods inherited from class com.arjuna.ats.arjuna.coordinator.BasicAction |
Abort, abortStatus, activate, activate, activeThreads, add, addChildAction, addChildThread, addChildThread, addRecord, Begin, childTransactions, commitStatus, criticalEnd, criticalStart, Current, deactivate, destroy, doAbort, doAbort, doCommit, doCommit, doPrepare, doPrepare, End, equals, 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 |
| Methods inherited from interface com.arjuna.ats.arjuna.coordinator.Reapable |
get_uid, preventCommit |
| Field Detail |
public static final int NO_TIMEOUT
| Constructor Detail |
public AtomicAction()
public AtomicAction(Uid objUid)
protected AtomicAction(int at)
| Method Detail |
public void finalize()
finalize in class BasicActionpublic int begin()
ActionStatus indicating outcome.public int begin(int timeout)
ActionStatus indicating outcome.public int commit()
ActionStatus indicating outcome.public int commit(boolean report_heuristics)
ActionStatus indicating outcome.public int abort()
ActionStatus indicating outcome.public int end(boolean report_heuristics)
end in class TwoPhaseCoordinatorpublic int cancel()
cancel in interface Reapablecancel in class TwoPhaseCoordinatorpublic final int getTimeout()
public java.lang.String type()
type in class TwoPhaseCoordinatorpublic boolean addThread()
true if successful, false
otherwise.public boolean addThread(java.lang.Thread t)
true if successful, false
otherwise.public boolean removeThread()
true if successful, false
otherwise.public boolean removeThread(java.lang.Thread t)
true if successful, false
otherwise.public static final AtomicAction suspend()
public static final boolean resume(AtomicAction act)
true if association is successful,
false otherwise.protected boolean checkForCurrent()
checkForCurrent in class BasicActiontrue to indicate that this transaction can only be
terminated by the right thread.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||