|
|||||||||
| 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.PersistenceRecord
com.arjuna.ats.arjuna.CadaverRecord
public class CadaverRecord
Cadaver records are created whenever a persistent object is deleted while still in the scope of an atomic action. This ensures that if the action commits the state of the persistent objects gets properly reflected back in the object store. For objects that are only recoverable such work is unnecessary. Cadaver records replace PersistenceRecords in the record list of an atomic action so they must be merged with such records to enable both commits and aborts to occur.
| Field Summary | |
|---|---|
protected StateManager |
objectAddr
|
protected OutputObjectState |
state
|
| Fields inherited from class com.arjuna.ats.arjuna.PersistenceRecord |
|---|
classicPrepare, MAX_OBJECT_SIZE, shadowMade, topLevelState |
| Fields inherited from class com.arjuna.ats.arjuna.StateManager |
|---|
modifyingActions, objectName, objectUid, smAttributes, usingActions |
| Constructor Summary | |
|---|---|
protected |
CadaverRecord()
Create a new instance using default values. |
|
CadaverRecord(OutputObjectState os,
ObjectStore objStore,
StateManager sm)
Create a new instance, passing in the object that is being managed. |
| Method Summary | |
|---|---|
void |
alter(AbstractRecord a)
Alter the current record with the one presented. |
ClassName |
className()
The ClassName representation of this class. |
static AbstractRecord |
create()
Create a new instance of the CadaverRecord, using the default constructor. |
boolean |
doSave()
Override the AbstractRecord.doSave. |
void |
finalize()
Tidy-up the instance. |
protected void |
forgetAction(boolean commit)
|
void |
merge(AbstractRecord mergewith)
merge takes the information from the incoming PersistenceRecord and uses it to initialise the oldState information. |
int |
nestedAbort()
The nested transaction has aborted. |
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()
The nested transaction is preparing. |
void |
print(java.io.PrintWriter strm)
Override AbstractRecord.print to write specific information to the specified stream. |
boolean |
propagateOnAbort()
Override default AbstractRecord method. |
void |
setValue(java.lang.Object newState)
|
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 ar)
Overrides AbstractRecord.shouldMerge |
boolean |
shouldReplace(AbstractRecord ar)
Overrides AbstractRecord.shouldReplace |
int |
topLevelAbort()
The nested transaction has aborted. |
int |
topLevelCommit()
At topLevelCommit we commit the uncommitted version already saved into object store. |
int |
topLevelPrepare()
At topLevelPrepare write uncommitted version into object store. |
java.lang.String |
type()
The type of the class - may be used to save information in an hierarchical manner in the object store. |
int |
typeIs()
The type of the record. |
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.PersistenceRecord |
|---|
restore_state, save_state, shadowForced, topLevelCleanup |
| Methods inherited from class com.arjuna.ats.arjuna.coordinator.AbstractRecord |
|---|
create, equals, forgetHeuristic, getNext, getPrevious, getTypeOfObject, greaterThan, lessThan, nestedCleanup, nestedOnePhaseCommit, order, 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 |
|---|
protected StateManager objectAddr
protected OutputObjectState state
| Constructor Detail |
|---|
public CadaverRecord(OutputObjectState os,
ObjectStore objStore,
StateManager sm)
OutputObjectState - os the state of the object that is being
removed.StateManager - sm the object being removed.protected CadaverRecord()
| Method Detail |
|---|
public void finalize()
finalize in class PersistenceRecordpublic boolean propagateOnAbort()
propagateOnAbort in class AbstractRecordtruepublic int typeIs()
typeIs in class PersistenceRecordRecordTypepublic ClassName className()
className in class PersistenceRecordClassName to identify this abstract record.public int nestedAbort()
TwoPhaseOutcome to indicate success/failure.TwoPhaseOutcomepublic int nestedPrepare()
TwoPhaseOutcome to indicate success/failure.TwoPhaseOutcomepublic int topLevelAbort()
topLevelAbort in class PersistenceRecordTwoPhaseOutcome to indicate success/failure.TwoPhaseOutcomepublic int topLevelCommit()
topLevelCommit in class PersistenceRecordTwoPhaseOutcome to indicate success/failure.TwoPhaseOutcomepublic int topLevelPrepare()
topLevelPrepare in class PersistenceRecordTwoPhaseOutcome to indicate success/failure.TwoPhaseOutcomepublic void print(java.io.PrintWriter strm)
print in class PersistenceRecordPrintWriter - strm the stream to use.public java.lang.String type()
type in class PersistenceRecordpublic boolean doSave()
doSave in class PersistenceRecordtrue if the object being removed is a persistent
object (RecordType.PERSISTENT). false otherwise.RecordTypepublic static AbstractRecord create()
public void merge(AbstractRecord mergewith)
AbstractRecord - mergewith The record to merge with.public boolean shouldMerge(AbstractRecord ar)
AbstractRecord - ar the record to potentially merge with.
true if this instance and the parameter have the
same id (order()) and the parameter is either persistent or recoverable.
false otherwise.RecordTypepublic boolean shouldReplace(AbstractRecord ar)
AbstractRecord - ar the record to potentially replace this
instance.
true if this instance and the parameter have the
same id (order()) and the parameter is either persistent or recoverable.
false otherwise.RecordTypepublic 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 nestedCommit()
nestedCommit in class AbstractRecordTwoPhaseOutcome to indicate success/failure.TwoPhaseOutcomepublic 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.protected final void forgetAction(boolean commit)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||