|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.arjuna.ats.arjuna.StateManager com.arjuna.ats.arjuna.coordinator.AbstractRecord com.arjuna.ats.arjuna.coordinator.RecoveryAbstractRecord
Abstract Record Interface Class. Used only for crash recovery. This interface allows us to use the Inventory for creating abstract records during crash recovery without having to make all abstract records accessible via interface/implementation separation (which affects the performance.) If performance issues can be ironed-out, then this may become obsolete in favour of a true AbstractRecord interface.
Field Summary |
Fields inherited from class com.arjuna.ats.arjuna.StateManager |
modifyingActions, objectName, objectUid, smAttributes, usingActions |
Constructor Summary | |
RecoveryAbstractRecord(ClassName cName,
int type,
boolean doSave)
|
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. |
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. |
boolean |
forgetHeuristic()
Forget any heuristic outcome which this implementation may have produced. |
java.lang.String |
getTypeOfObject()
Return the type of the abstract record. |
void |
merge(AbstractRecord a)
Merge the current record with the one presented. |
int |
nestedAbort()
Atomic action interface - one operation per two-phase commit state. |
int |
nestedCommit()
A commit of a nested transaction has occurred. |
int |
nestedPrepare()
A prepare for a nested transaction has occurred. |
Uid |
order()
Return the Uid of this abstract record so that it can be ordered in the intentions list. |
void |
print(java.io.PrintWriter strm)
Write information about this specific instance to the specified stream. |
boolean |
propagateOnAbort()
Determine if records are discarded on action abort or must be propagated to parents. |
boolean |
propagateOnCommit()
Determine if records are discarded on action commit or must be propagated to parents. |
AbstractRecord |
record()
|
boolean |
restore_state(InputObjectState os,
int i)
save_state and restore_state here are used by the corresponding operations of persistence records for crash recovery purposes. |
boolean |
save_state(OutputObjectState os,
int i)
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 o)
|
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()
A rollback of a top-level transaction has occurred. |
int |
topLevelCleanup()
Cleanup is called if a top-level action is detected to be an orphan. |
int |
topLevelCommit()
A commit of a top-level transaction has occurred. |
int |
topLevelPrepare()
A prepare for a top-level transaction has occurred. |
java.lang.String |
type()
Re-implementation of abstract methods inherited from base class |
int |
typeIs()
|
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, getNext, getPrevious, greaterThan, lessThan, nestedCleanup, nestedOnePhaseCommit, 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 |
Constructor Detail |
public RecoveryAbstractRecord(ClassName cName, int type, boolean doSave)
Method Detail |
public void finalize()
StateManager
finalize
in class StateManager
public int typeIs()
typeIs
in class AbstractRecord
RecordType
value.public ClassName className()
AbstractRecord
className
in class AbstractRecord
ClassName
to identify this abstract record.public AbstractRecord record()
public java.lang.Object value()
AbstractRecord
HeuristicInformation
value
in class AbstractRecord
Object
to be used to order.public void setValue(java.lang.Object o)
setValue
in class AbstractRecord
public int nestedAbort()
nestedAbort
in class AbstractRecord
TwoPhaseOutcome
to indicate success/failure.TwoPhaseOutcome
public int nestedCommit()
AbstractRecord
nestedCommit
in class AbstractRecord
TwoPhaseOutcome
to indicate success/failure.TwoPhaseOutcome
public int nestedPrepare()
AbstractRecord
nestedPrepare
in class AbstractRecord
TwoPhaseOutcome
to indicate success/failure.TwoPhaseOutcome
public int topLevelAbort()
AbstractRecord
topLevelAbort
in class AbstractRecord
TwoPhaseOutcome
to indicate success/failure.TwoPhaseOutcome
public int topLevelCommit()
AbstractRecord
topLevelCommit
in class AbstractRecord
TwoPhaseOutcome
to indicate success/failure.TwoPhaseOutcome
public int topLevelPrepare()
AbstractRecord
topLevelPrepare
in class AbstractRecord
TwoPhaseOutcome
to indicate success/failure.TwoPhaseOutcome
public Uid order()
AbstractRecord
order
in class AbstractRecord
Uid for this instance.- See Also:
Uid
public java.lang.String getTypeOfObject()
AbstractRecord
getTypeOfObject
in class AbstractRecord
String
representing type.public boolean propagateOnAbort()
AbstractRecord
propagateOnAbort
in class AbstractRecord
public boolean propagateOnCommit()
AbstractRecord
propagateOnCommit
in class AbstractRecord
public int topLevelCleanup()
topLevelCleanup
in class AbstractRecord
TwoPhaseOutcome
as default is the same as
topLevelAbort.public boolean doSave()
AbstractRecord
doSave
in class AbstractRecord
true
if it should be saved, false
otherwise. false
is the default.public java.lang.String type()
type
in class AbstractRecord
public void print(java.io.PrintWriter strm)
AbstractRecord
print
in class AbstractRecord
public boolean restore_state(InputObjectState os, int i)
restore_state
in class AbstractRecord
true
if successful, false
otherwise.public boolean save_state(OutputObjectState os, int i)
AbstractRecord
save_state
in class AbstractRecord
true
if successful, false
otherwise.public boolean forgetHeuristic()
AbstractRecord
forgetHeuristic
in class AbstractRecord
true
by default. If false
is
returned then the instance must be remembered by the transaction
(in the log) in order for recovery to retry later or for a system
administrator to be able to determine which resources have not
been successfully completed.public void merge(AbstractRecord a)
AbstractRecord
merge
in class AbstractRecord
public void alter(AbstractRecord a)
AbstractRecord
alter
in class AbstractRecord
public boolean shouldAdd(AbstractRecord a)
AbstractRecord
shouldAdd
in class AbstractRecord
true
if the record should be added,
false
otherwise.public boolean shouldAlter(AbstractRecord a)
AbstractRecord
shouldAlter
in class AbstractRecord
true
if the record should be altered,
false
otherwise.public boolean shouldMerge(AbstractRecord a)
AbstractRecord
shouldMerge
in class AbstractRecord
true
if the record should be merged,
false
otherwise.public boolean shouldReplace(AbstractRecord a)
AbstractRecord
shouldReplace
in class AbstractRecord
true
if the record should be replaced,
false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |