public class RecoveryRecord extends AbstractRecord
Modifier and Type | Field and Description |
---|---|
protected StateManager |
objectAddr |
protected OutputObjectState |
state |
modifyingActions, objectModel, objectUid, usingActions
Constructor and Description |
---|
RecoveryRecord() |
RecoveryRecord(OutputObjectState os,
StateManager sm)
This constructor is used to create a new instance of a RecoveryRecord.
|
Modifier and Type | Method and Description |
---|---|
void |
alter(AbstractRecord a)
Alter the current record with the one presented.
|
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.
|
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(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(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 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 for Recovery records implies the object state should be
restored to the saved state exactly like a nested abort.
|
int |
topLevelCommit()
topLevelCommit has nothing to do for RecoveryRecords as no changes have
been made in the object store.
|
int |
topLevelPrepare()
topLevelPrepare can return PREPARE_READONLY to avoid topLevelCommit being
called in the action commit case
|
String |
type()
Re-implementation of abstract methods inherited from base class.
|
int |
typeIs() |
Object |
value()
If this abstract record caused a heuristic then it should return an
object which implements
HeuristicInformation |
create, equals, forgetHeuristic, getNext, getPrevious, getTypeOfObject, greaterThan, lessThan, nestedCleanup, nestedOnePhaseCommit, order, propagateOnAbort, propagateOnCommit, replace, setNext, setPrevious, topLevelCleanup, topLevelOnePhaseCommit
activate, activate, cleanup, createLists, deactivate, deactivate, deactivate, destroy, disable, forgetAction, get_uid, getMutex, getObjectModel, getStore, getStoreRoot, loadObjectState, lockMutex, modified, objectType, packHeader, persist, rememberAction, setStatus, setupStore, setupStore, setupStore, status, terminate, tryLockMutex, unlockMutex, unpackHeader
protected StateManager objectAddr
protected OutputObjectState state
public RecoveryRecord(OutputObjectState os, StateManager sm)
public RecoveryRecord()
public int typeIs()
typeIs
in class AbstractRecord
RecordType
value.public Object value()
AbstractRecord
HeuristicInformation
value
in class AbstractRecord
Object
to be used to order.public void setValue(Object newState)
setValue
in class AbstractRecord
public int nestedAbort()
nestedAbort
in class AbstractRecord
TwoPhaseOutcome
to indicate success/failure.TwoPhaseOutcome
public int nestedCommit()
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()
topLevelAbort
in class AbstractRecord
TwoPhaseOutcome
to indicate success/failure.TwoPhaseOutcome
public int topLevelCommit()
topLevelCommit
in class AbstractRecord
TwoPhaseOutcome
to indicate success/failure.TwoPhaseOutcome
public int topLevelPrepare()
topLevelPrepare
in class AbstractRecord
TwoPhaseOutcome
to indicate success/failure.TwoPhaseOutcome
public boolean doSave()
AbstractRecord
doSave
in class AbstractRecord
true
if it should be saved, false
otherwise. false
is the default.public boolean restore_state(InputObjectState os, int ot)
AbstractRecord
restore_state
in class AbstractRecord
true
if successful, false
otherwise.public boolean save_state(OutputObjectState os, int ot)
AbstractRecord
save_state
in class AbstractRecord
true
if successful, false
otherwise.public void print(PrintWriter strm)
AbstractRecord
print
in class AbstractRecord
strm
- the stream on which to output.public String type()
AbstractRecord
type
in class AbstractRecord
public void merge(AbstractRecord a)
AbstractRecord
merge
in class AbstractRecord
a
- the record with which to merge.public void alter(AbstractRecord a)
AbstractRecord
alter
in class AbstractRecord
a
- the record with which to alter.public boolean shouldAdd(AbstractRecord a)
AbstractRecord
shouldAdd
in class AbstractRecord
a
- The record to try to add.true
if the record should be added,
false
otherwise.public boolean shouldAlter(AbstractRecord a)
AbstractRecord
shouldAlter
in class AbstractRecord
a
- The record to try to alter.true
if the record should be altered,
false
otherwise.public boolean shouldMerge(AbstractRecord a)
AbstractRecord
shouldMerge
in class AbstractRecord
a
- The record to try to merge.true
if the record should be merged,
false
otherwise.public boolean shouldReplace(AbstractRecord a)
AbstractRecord
shouldReplace
in class AbstractRecord
a
- The record to try to replace.true
if the record should be replaced,
false
otherwise.protected final void forgetAction(boolean commit)
Copyright © 2021 JBoss by Red Hat. All rights reserved.