|
||||||||||
| 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.AbstractRecord
com.arjuna.ats.arjuna.RecoveryRecord
com.arjuna.ats.arjuna.PersistenceRecord
A PersistenceRecord is created whenever a persistent object is created/read/modified within the scope of a transaction. It is responsible for ensuring that state changes are committed or rolled back on behalf of the object depending upon the outcome of the transaction.
| Field Summary | |
protected static boolean |
classicPrepare
|
static int |
MAX_OBJECT_SIZE
|
protected StateManager |
objectAddr
|
protected boolean |
shadowMade
|
protected OutputObjectState |
state
|
protected ObjectStore |
store
|
protected OutputObjectState |
topLevelState
|
| Fields inherited from class com.arjuna.ats.arjuna.StateManager |
modifyingActions, objectName, objectUid, smAttributes, usingActions |
| Constructor Summary | |
protected |
PersistenceRecord()
Creates a 'blank' persistence record. |
|
PersistenceRecord(OutputObjectState os,
ObjectStore objStore,
StateManager sm)
This constructor is used to create a new instance of PersistenceRecord. |
| Method Summary | |
void |
alter(AbstractRecord a)
Alter the current record with the one presented. |
ClassName |
className()
Only used for crash recovery, so most records don't need it. |
static AbstractRecord |
create()
|
boolean |
doSave()
Should this record be saved in the intentions list? If the record is saved, then it may be recovered later in the event of a failure. |
void |
finalize()
Destructor. |
protected void |
forgetAction(boolean commit)
|
void |
merge(AbstractRecord a)
Merge the current record with the one presented. |
int |
nestedAbort()
nestedAbort causes the restore_state function of the object to be invoked passing it the saved ObjectState. |
int |
nestedCommit()
nestedCommit does nothing since the passing of the state up to the parent action is handled by the record list merging system. |
int |
nestedPrepare()
A prepare for a nested transaction has occurred. |
void |
print(java.io.PrintWriter strm)
Write information about this specific instance to the specified stream. |
boolean |
restore_state(InputObjectState os,
int ot)
During recovery, the transaction log is given to the recovery system and it will recreate a transaction instance to perform necessary recovery actions. |
boolean |
save_state(OutputObjectState os,
int ot)
When the transaction is required to make the intentions list persistent, it scans the list and asks each record whether or not it requires state to be saved (by calling doSave). |
void |
setValue(java.lang.Object newState)
|
protected boolean |
shadowForced()
Cadaver records force write shadows. |
boolean |
shouldAdd(AbstractRecord a)
Should we add the record presented to the intentions list? |
boolean |
shouldAlter(AbstractRecord a)
Should we alter the current record with the one presented? |
boolean |
shouldMerge(AbstractRecord a)
Should we merge the current record with the one presented? |
boolean |
shouldReplace(AbstractRecord a)
Should we replace the record presented with the current record? |
int |
topLevelAbort()
topLevelAbort may have to remove the persistent state that was written into the object store during the processing of topLevelPrepare. |
int |
topLevelCleanup()
topLevelCleanup must leave the persistent state that was written in the object store during the processing of topLevelPrepare intact. |
int |
topLevelCommit()
commit the state saved during the prepare phase. |
int |
topLevelPrepare()
topLevelPrepare attempts to save the object. |
java.lang.String |
type()
Re-implementation of abstract methods inherited from base class. |
int |
typeIs()
Redefintions of abstract functions inherited from RecoveryRecord. |
java.lang.Object |
value()
If this abstract record caused a heuristic then it should return an object which implements HeuristicInformation |
| Methods inherited from class com.arjuna.ats.arjuna.coordinator.AbstractRecord |
create, equals, forgetHeuristic, getNext, getPrevious, getTypeOfObject, greaterThan, lessThan, nestedCleanup, nestedOnePhaseCommit, order, propagateOnAbort, propagateOnCommit, replace, setNext, setPrevious, topLevelOnePhaseCommit |
| Methods inherited from class com.arjuna.ats.arjuna.StateManager |
activate, activate, attributes, cleanup, deactivate, deactivate, deactivate, destroy, disable, forgetAction, get_uid, getMutex, getStore, getStoreRoot, loadObjectState, lockMutex, modified, ObjectType, packHeader, persist, rememberAction, setStatus, setupStore, setupStore, status, terminate, tryLockMutex, unlockMutex, unpackHeader |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int MAX_OBJECT_SIZE
protected boolean shadowMade
protected ObjectStore store
protected OutputObjectState topLevelState
protected static boolean classicPrepare
protected StateManager objectAddr
protected OutputObjectState state
| Constructor Detail |
public PersistenceRecord(OutputObjectState os,
ObjectStore objStore,
StateManager sm)
protected PersistenceRecord()
| Method Detail |
public void finalize()
StateManager
public int typeIs()
public ClassName className()
AbstractRecord
className in class AbstractRecordClassName to identify this abstract record.public int topLevelAbort()
public int topLevelCommit()
public int topLevelPrepare()
public int topLevelCleanup()
topLevelCleanup in class AbstractRecordTwoPhaseOutcome as default is the same as
topLevelAbort.public boolean doSave()
AbstractRecord
true
public boolean restore_state(InputObjectState os,
int ot)
AbstractRecord
public boolean save_state(OutputObjectState os,
int ot)
AbstractRecord
public void print(java.io.PrintWriter strm)
AbstractRecord
public java.lang.String type()
AbstractRecord
public static AbstractRecord create()
protected boolean shadowForced()
public java.lang.Object value()
AbstractRecordHeuristicInformation
value in class AbstractRecordObject to be used to order.public void setValue(java.lang.Object newState)
setValue in class AbstractRecordpublic int nestedAbort()
nestedAbort in class AbstractRecordTwoPhaseOutcome to indicate success/failure.TwoPhaseOutcomepublic int nestedCommit()
nestedCommit in class AbstractRecordTwoPhaseOutcome to indicate success/failure.TwoPhaseOutcomepublic int nestedPrepare()
AbstractRecord
nestedPrepare in class AbstractRecordTwoPhaseOutcome to indicate success/failure.TwoPhaseOutcomepublic void merge(AbstractRecord a)
AbstractRecord
merge in class AbstractRecordpublic void alter(AbstractRecord a)
AbstractRecord
alter in class AbstractRecordpublic boolean shouldAdd(AbstractRecord a)
AbstractRecord
shouldAdd in class AbstractRecordtrue if the record should be added,
false otherwise.public boolean shouldAlter(AbstractRecord a)
AbstractRecord
shouldAlter in class AbstractRecordtrue if the record should be altered,
false otherwise.public boolean shouldMerge(AbstractRecord a)
AbstractRecord
shouldMerge in class AbstractRecordtrue if the record should be merged,
false otherwise.public boolean shouldReplace(AbstractRecord a)
AbstractRecord
shouldReplace in class AbstractRecordtrue if the record should be replaced,
false otherwise.protected final void forgetAction(boolean commit)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||