public class ExtendedResourceRecord extends AbstractRecord
modifyingActions, objectModel, objectUid, usingActions
Constructor and Description |
---|
ExtendedResourceRecord()
Protected constructor used by crash recovery.
|
ExtendedResourceRecord(boolean propagate,
Uid objUid,
ArjunaSubtranAwareResource theResource,
Coordinator myParent,
Uid recCoordUid,
ArjunaTransactionImple current) |
Modifier and Type | Method and Description |
---|---|
void |
alter(AbstractRecord absRec)
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.
|
boolean |
forgetHeuristic()
Forget any heuristic outcome which this implementation may have produced.
|
Uid |
getRCUid() |
void |
merge(AbstractRecord absRec)
Merge the current record with the one presented.
|
int |
nestedAbort()
General nesting rules:
Only SubtransactionAware resources get registered with nested actions.
|
int |
nestedCommit()
A commit of a nested transaction has occurred.
|
int |
nestedOnePhaseCommit()
Perform a nested one phase commit.
|
int |
nestedPrepare()
Because resource is an Arjuna AbstractRecord we can do proper nesting!
|
Uid |
order()
Return the Uid of this abstract record so that it can be ordered in the
intentions list.
|
void |
print(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.
|
ArjunaSubtranAwareResource |
resourceHandle()
Specific OTS method for getting at the value.
|
boolean |
restore_state(InputObjectState os,
int t)
restore_state and save_state for ExtendedResourceRecords doesn't
generally apply due to object pointers.
|
boolean |
save_state(OutputObjectState os,
int t)
restore_state and save_state for ExtendedResourceRecords doesn't
generally apply due to object pointers.
|
void |
setValue(Object o) |
boolean |
shouldAdd(AbstractRecord absRec)
Should we add the record presented to the intentions list?
|
boolean |
shouldAlter(AbstractRecord absRec)
Should we alter the current record with the one presented?
|
boolean |
shouldMerge(AbstractRecord absRec)
Should we merge the current record with the one presented?
|
boolean |
shouldReplace(AbstractRecord absRec)
Should we replace the record presented with the current record?
|
int |
topLevelAbort()
A rollback of a top-level transaction has occurred.
|
int |
topLevelCommit()
A commit of a top-level transaction has occurred.
|
int |
topLevelOnePhaseCommit()
Perform a top-level one phase commit.
|
int |
topLevelPrepare()
A prepare for a top-level transaction has occurred.
|
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, getNext, getPrevious, getTypeOfObject, greaterThan, lessThan, nestedCleanup, replace, setNext, setPrevious, topLevelCleanup
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
public ExtendedResourceRecord(boolean propagate, Uid objUid, ArjunaSubtranAwareResource theResource, Coordinator myParent, Uid recCoordUid, ArjunaTransactionImple current)
propagate
- tells us whether to propagate the resource at nested commit or
not.theResource
- is the proxy that allows us to call out to the object.myParent
- is the proxy for the parent coordinator needed in
commit_subtransaction.public ExtendedResourceRecord()
public final ArjunaSubtranAwareResource resourceHandle()
public boolean propagateOnCommit()
AbstractRecord
propagateOnCommit
in class AbstractRecord
true
if the record should be propagated to the
parent transaction if the current transaction commits,
false
otherwise. The default is true
.public boolean propagateOnAbort()
AbstractRecord
propagateOnAbort
in class AbstractRecord
true
if the record should be propagated to the
parent transaction if the current transaction rolls back,
false
otherwise. The default is false
.public Uid order()
AbstractRecord
order
in class AbstractRecord
Uid
for this instance.Uid
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 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()
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 int nestedOnePhaseCommit()
AbstractRecord
nestedOnePhaseCommit
in class AbstractRecord
TwoPhaseOutcome
to indicate success/failure.TwoPhaseOutcome
public int topLevelOnePhaseCommit()
AbstractRecord
topLevelOnePhaseCommit
in class AbstractRecord
TwoPhaseOutcome
to indicate success/failure.TwoPhaseOutcome
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 print(PrintWriter strm)
AbstractRecord
print
in class AbstractRecord
strm
- the stream on which to output.public boolean restore_state(InputObjectState os, int t)
restore_state
in class AbstractRecord
true
if successful, false
otherwise.public boolean save_state(OutputObjectState os, int t)
save_state
in class AbstractRecord
true
if successful, false
otherwise.public String type()
AbstractRecord
type
in class AbstractRecord
public boolean doSave()
AbstractRecord
doSave
in class AbstractRecord
true
if it should be saved, false
otherwise. false
is the default.public final Uid getRCUid()
public void merge(AbstractRecord absRec)
AbstractRecord
merge
in class AbstractRecord
absRec
- the record with which to merge.public void alter(AbstractRecord absRec)
AbstractRecord
alter
in class AbstractRecord
absRec
- the record with which to alter.public boolean shouldAdd(AbstractRecord absRec)
AbstractRecord
shouldAdd
in class AbstractRecord
absRec
- The record to try to add.true
if the record should be added,
false
otherwise.public boolean shouldAlter(AbstractRecord absRec)
AbstractRecord
shouldAlter
in class AbstractRecord
absRec
- The record to try to alter.true
if the record should be altered,
false
otherwise.public boolean shouldMerge(AbstractRecord absRec)
AbstractRecord
shouldMerge
in class AbstractRecord
absRec
- The record to try to merge.true
if the record should be merged,
false
otherwise.public boolean shouldReplace(AbstractRecord absRec)
AbstractRecord
shouldReplace
in class AbstractRecord
absRec
- The record to try to replace.true
if the record should be replaced,
false
otherwise.Copyright © 2021 JBoss by Red Hat. All rights reserved.