public class ResourceRecord extends AbstractRecord
modifyingActions, objectModel, objectUid, usingActions| Constructor and Description |
|---|
ResourceRecord() |
ResourceRecord(boolean propagate,
Resource theResource,
Coordinator myParent,
Uid recCoordUid,
ArjunaTransactionImple current)
Constructor
|
ResourceRecord(boolean propagate,
Resource theResource,
Uid recCoordUid) |
| 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.
|
boolean |
forgetHeuristic()
Forget any heuristic outcome which this implementation may have produced.
|
Uid |
getRCUid() |
void |
merge(AbstractRecord a)
Merge the current record with the one presented.
|
int |
nestedAbort()
General nesting rules:
Only SubtransactionAware resources get registered with nested actions.
|
int |
nestedCommit()
If this resource handles nesting this was done in prepare
or it should be ignored.
|
int |
nestedOnePhaseCommit()
Perform a nested one phase commit.
|
int |
nestedPrepare()
OTS does not use nested prepare at all!
However, to make nested commit/abort clean we do commit_subtransaction
here.
|
void |
print(PrintWriter strm)
Write information about this specific instance to the specified stream.
|
boolean |
propagateOnCommit()
Determine if records are discarded on action commit or must be propagated
to parents.
|
static void |
remove(AbstractRecord toDelete) |
Resource |
resourceHandle() |
boolean |
restore_state(InputObjectState os,
int t)
restore_state and save_state for ResourceRecords doesn't generally
apply due to object pointers.
|
boolean |
save_state(OutputObjectState os,
int t)
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 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 rec)
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, order, propagateOnAbort, replace, setNext, setPrevious, topLevelCleanupactivate, 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, unpackHeaderpublic ResourceRecord(boolean propagate,
Resource 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 ResourceRecord()
public final Resource resourceHandle()
public boolean propagateOnCommit()
AbstractRecordpropagateOnCommit in class AbstractRecordtrue if the record should be propagated to the
parent transaction if the current transaction commits,
false otherwise. The default is true.public int typeIs()
typeIs in class AbstractRecordRecordType value.public Object value()
AbstractRecordHeuristicInformationvalue in class AbstractRecordObject to be used to order.public void setValue(Object o)
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()
nestedPrepare in class AbstractRecordTwoPhaseOutcome to indicate success/failure.TwoPhaseOutcomepublic int topLevelAbort()
AbstractRecordtopLevelAbort in class AbstractRecordTwoPhaseOutcome to indicate success/failure.TwoPhaseOutcomepublic int topLevelCommit()
AbstractRecordtopLevelCommit in class AbstractRecordTwoPhaseOutcome to indicate success/failure.TwoPhaseOutcomepublic int topLevelPrepare()
AbstractRecordtopLevelPrepare in class AbstractRecordTwoPhaseOutcome to indicate success/failure.TwoPhaseOutcomepublic int nestedOnePhaseCommit()
AbstractRecordnestedOnePhaseCommit in class AbstractRecordTwoPhaseOutcome to indicate success/failure.TwoPhaseOutcomepublic int topLevelOnePhaseCommit()
AbstractRecordtopLevelOnePhaseCommit in class AbstractRecordTwoPhaseOutcome to indicate success/failure.TwoPhaseOutcomepublic boolean forgetHeuristic()
AbstractRecordforgetHeuristic in class AbstractRecordtrue 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 static void remove(AbstractRecord toDelete)
public void print(PrintWriter strm)
AbstractRecordprint in class AbstractRecordstrm - the stream on which to output.public boolean restore_state(InputObjectState os, int t)
restore_state in class AbstractRecordtrue if successful, false
otherwise.public boolean save_state(OutputObjectState os, int t)
AbstractRecordsave_state in class AbstractRecordtrue if successful, false
otherwise.public String type()
AbstractRecordtype in class AbstractRecordpublic boolean doSave()
AbstractRecorddoSave in class AbstractRecordtrue if it should be saved, false
otherwise. false is the default.public final Uid getRCUid()
public void merge(AbstractRecord a)
AbstractRecordmerge in class AbstractRecorda - the record with which to merge.public void alter(AbstractRecord a)
AbstractRecordalter in class AbstractRecorda - the record with which to alter.public boolean shouldAdd(AbstractRecord a)
AbstractRecordshouldAdd in class AbstractRecorda - The record to try to add.true if the record should be added,
false otherwise.public boolean shouldAlter(AbstractRecord a)
AbstractRecordshouldAlter in class AbstractRecorda - The record to try to alter.true if the record should be altered,
false otherwise.public boolean shouldMerge(AbstractRecord a)
AbstractRecordshouldMerge in class AbstractRecorda - The record to try to merge.true if the record should be merged,
false otherwise.public boolean shouldReplace(AbstractRecord rec)
AbstractRecordshouldReplace in class AbstractRecordrec - The record to try to replace.true if the record should be replaced,
false otherwise.Copyright © 2016 JBoss by Red Hat. All rights reserved.