public class ParticipantRecord extends AbstractRecord
modifyingActions, objectModel, objectUid, usingActions| Constructor and Description |
|---|
ParticipantRecord() |
ParticipantRecord(Participant theResource,
Uid id)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
alter(AbstractRecord a)
Alter the current record with the one presented.
|
boolean |
complete() |
void |
completed()
record the fact that this participant has completed
|
static AbstractRecord |
create() |
void |
delist(boolean failed)
record the fact that this participant has exited
|
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()
The record generated a heuristic and can now forget about it.
|
boolean |
isActive()
is the participant is still able to be sent a complete request
|
boolean |
isParticipantCompletion()
is this a ParticipantCompletion participant
|
void |
merge(AbstractRecord a)
Merge the current record with the one presented.
|
int |
nestedAbort()
The record is being driven through nested rollback.
|
int |
nestedCommit()
The record is being driven through nested commit.
|
int |
nestedOnePhaseCommit()
The record is being driven through nested commit and is the only
resource.
|
int |
nestedPrepare()
The record is being driven through nested prepare.
|
void |
print(PrintWriter strm)
Write information about this specific instance to the specified stream.
|
boolean |
propagateOnCommit()
Override AbstractRecord.propagateOnCommit
|
void |
remove(AbstractRecord toDelete) |
boolean |
restore_state(InputObjectState os,
int t)
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 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)
Set the internal value.
|
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()
The record is being driven through top-level rollback.
|
int |
topLevelCommit()
The record is being driven through top-level commit.
|
int |
topLevelOnePhaseCommit()
The record is being driven through top-level commit and is the only
resource.
|
int |
topLevelPrepare()
The record is being driven through top-level prepare.
|
String |
type()
Re-implementation of abstract methods inherited from base class.
|
int |
typeIs()
The type of this abstract record.
|
Object |
value()
The internal value.
|
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 ParticipantRecord(Participant theResource, Uid id)
theResource - is the proxy that allows us to call out to the object.public ParticipantRecord()
public boolean propagateOnCommit()
propagateOnCommit 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()
value 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()
topLevelAbort in class AbstractRecordTwoPhaseOutcome to indicate success/failure.TwoPhaseOutcomepublic int topLevelCommit()
topLevelCommit in class AbstractRecordTwoPhaseOutcome to indicate success/failure.TwoPhaseOutcomepublic int topLevelPrepare()
topLevelPrepare in class AbstractRecordTwoPhaseOutcome to indicate success/failure.TwoPhaseOutcomepublic int nestedOnePhaseCommit()
nestedOnePhaseCommit in class AbstractRecordTwoPhaseOutcome to indicate success/failure.TwoPhaseOutcomepublic int topLevelOnePhaseCommit()
topLevelOnePhaseCommit in class AbstractRecordTwoPhaseOutcome to indicate success/failure.TwoPhaseOutcomepublic boolean forgetHeuristic()
forgetHeuristic 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 boolean complete()
public static AbstractRecord create()
public 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)
AbstractRecordrestore_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 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.public final void delist(boolean failed)
failed - true if the exit was because of a failure i.e. the participant may be in an unclean statepublic final void completed()
public final boolean isActive()
public final boolean isParticipantCompletion()
Copyright © 2013. All rights reserved.