public class SubordinateATCoordinator extends ATCoordinator
Modifier and Type | Class and Description |
---|---|
static class |
SubordinateATCoordinator.SubordinateCallback
class implemented by any code which wishes to register a callabck
|
Modifier and Type | Field and Description |
---|---|
static String |
PARTICIPANT_PREFIX
unique string used as prefix for participant ids to ensure they can be identified at recovery
|
static String |
SUBORDINATE_TX_TYPE_AT_AT
standard AT subordinate tx type for an AT subordinate created below another AT transaction
|
static String |
TRANSACTION_TYPE
type string used to locate TX log records in the tx object store hierarchy
|
Constructor and Description |
---|
SubordinateATCoordinator()
normal constructor
|
SubordinateATCoordinator(String subordinateType)
bridge wrapper constructor
|
SubordinateATCoordinator(com.arjuna.ats.arjuna.common.Uid recovery)
constructor for recovered coordinator
|
Modifier and Type | Method and Description |
---|---|
static void |
addActiveProxy(String id) |
static void |
addCallback(String key,
SubordinateATCoordinator.SubordinateCallback callback)
register a callback to be called when a subordinate transaction with a specific key executes
a commit or rollback.
|
protected static void |
addRecoveredCoordinator(SubordinateATCoordinator coordinator) |
int |
cancel() |
void |
commit()
this is driven by a durable participant registered on behalf of the coordinator and does a
normal commit minus the after completion processing which will be driven by a volatile
participant also registerd for this coordinator..
|
void |
commitVolatile()
this is driven by a volatile participant registered on behalf of the coordinator
|
Outcome |
coordinate(CompletionStatus cs)
If the application requires and if the coordination protocol supports it,
then this method can be used to execute a coordination protocol on the
currently enlisted participants at any time prior to the termination of
the coordination scope.
|
int |
end(boolean reportHeuristics) |
void |
error()
called by the durable participant during recovery processing
TODO clarify when and why this gets called and what to do about it
|
String |
getDurable2PhaseId()
return a uid for the durable participant registered on behalf of this corodinator
|
static SubordinateATCoordinator |
getRecoveredCoordinator(String coordinatorId) |
String |
getSubordinateType() |
String |
getVolatile2PhaseId()
return a uid for the volatile participant registered on behalf of this corodinator
|
boolean |
isActivated() |
boolean |
isOrphaned()
test whether a transaction has been restored without its proxy participant.
|
static SubordinateATCoordinator[] |
listRecoveredCoordinators() |
int |
prepare()
this is driven by a durable participant registered on behalf of the coordinator and does a
normal prepare mninus the before completion processing which has already been performed
|
boolean |
prepareVolatile()
this is driven by a volatile participant registered on behalf of the coordinator
|
static void |
removeActiveProxy(String id) |
protected static void |
removeRecoveredCoordinator(SubordinateATCoordinator coordinator) |
boolean |
restore_state(com.arjuna.ats.arjuna.state.InputObjectState os,
int ot) |
void |
rollback()
this is driven by a durable participant registered on behalf of the coordinator and does a
normal commit minus the after completion processing which will be driven by a volatile
participant also registerd for this coordinator..
|
void |
rollbackVolatile()
this is driven by a volatile participant registered on behalf of the coordinator
|
boolean |
save_state(com.arjuna.ats.arjuna.state.OutputObjectState os,
int ot) |
protected void |
setActivated() |
String |
type() |
void |
unknown()
called by the durable participant during recovery processing
TODO clarify when and why this gets called and what to do about it
|
delistParticipant, delistSynchronization, enlistParticipant, enlistSynchronization, identifier, participantReadOnly, participantRolledBack, qualifiers
addSynchronization, afterCompletion, afterCompletion, asyncAfterCompletion, beforeCompletion, getDeferredThrowable, getSynchronizations, running, start, start
Abort, Abort, abortStatus, activate, activate, activeThreads, add, addChildAction, addChildThread, addChildThread, addRecord, async_prepare, Begin, checkForCurrent, childTransactions, commitStatus, criticalEnd, criticalStart, Current, deactivate, destroy, doAbort, doAbort, doCommit, doCommit, doPrepare, End, equals, finalizeInternal, forgetHeuristics, getDeferredThrowables, getHeuristicDecision, getHierarchy, getSavingUid, getStore, hashCode, hierarchyDepth, insertRecord, isAncestor, maintainHeuristics, onePhaseCommit, parent, phase2Abort, phase2Cleanup, phase2Commit, prepare, preparedStatus, preventCommit, removeChildAction, removeChildThread, removeChildThread, setCheckedAction, setHeuristicDecision, status, topLevelAction, topLevelActionUid, toString, typeOfAction, updateHeuristic, updateState
cleanup, createLists, deactivate, deactivate, disable, forgetAction, get_uid, getMutex, getObjectModel, getStoreRoot, loadObjectState, lockMutex, modified, objectType, packHeader, persist, print, rememberAction, setStatus, setupStore, setupStore, setupStore, terminate, tryLockMutex, unlockMutex, unpackHeader
public static final String TRANSACTION_TYPE
public static String PARTICIPANT_PREFIX
public static final String SUBORDINATE_TX_TYPE_AT_AT
public SubordinateATCoordinator()
public SubordinateATCoordinator(String subordinateType)
public SubordinateATCoordinator(com.arjuna.ats.arjuna.common.Uid recovery)
recovery
- public Outcome coordinate(CompletionStatus cs) throws WrongStateException, ProtocolViolationException, SystemException
coordinate
in class ATCoordinator
cs
- The completion status to use when determining how to
execute the protocol.WrongStateException
- Thrown if the coordinator is in a state the does not allow
coordination to occur.ProtocolViolationException
- Thrown if the protocol is violated in some manner during
execution.SystemException
- Thrown if any other error occurs.public int end(boolean reportHeuristics)
end
in class com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator
public int cancel()
cancel
in interface com.arjuna.ats.arjuna.coordinator.Reapable
cancel
in class com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator
public boolean prepareVolatile()
public int prepare()
public void commitVolatile()
public void commit()
public void rollbackVolatile()
public void rollback()
public void unknown()
public void error()
public String type()
type
in class ATCoordinator
public String getVolatile2PhaseId()
public String getDurable2PhaseId()
protected static void addRecoveredCoordinator(SubordinateATCoordinator coordinator)
protected static void removeRecoveredCoordinator(SubordinateATCoordinator coordinator)
public static void addActiveProxy(String id)
public static void removeActiveProxy(String id)
protected void setActivated()
public boolean isActivated()
public boolean isOrphaned()
public static SubordinateATCoordinator getRecoveredCoordinator(String coordinatorId)
public static SubordinateATCoordinator[] listRecoveredCoordinators()
public String getSubordinateType()
public boolean save_state(com.arjuna.ats.arjuna.state.OutputObjectState os, int ot)
save_state
in class com.arjuna.ats.arjuna.coordinator.BasicAction
public boolean restore_state(com.arjuna.ats.arjuna.state.InputObjectState os, int ot)
restore_state
in class com.arjuna.ats.arjuna.coordinator.BasicAction
public static void addCallback(String key, SubordinateATCoordinator.SubordinateCallback callback)
key
- callback
- Copyright © 2019 JBoss by Red Hat. All rights reserved.