public class SubordinateBACoordinator extends BACoordinator
Modifier and Type | Class and Description |
---|---|
static class |
SubordinateBACoordinator.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
|
Constructor and Description |
---|
SubordinateBACoordinator()
normal constructor
|
SubordinateBACoordinator(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,
SubordinateBACoordinator.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(SubordinateBACoordinator coordinator) |
int |
cancel()
this is driven by a coordinator-completion participant registered on behalf of the coordinator
and is required to propagate the cancel to all registered participants.
|
int |
close()
this is driven by a coordinator-completion participant registered on behalf of the coordinator
and is required to propagate the close to all registered participants.
|
void |
complete()
this is driven by a coordinator-completion participant registered on behalf of the coordinator
and is required to propagate the complete to all registered coordinator-completion participants.
|
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 |
getCoordinatorCompletionParticipantid()
return a uid for the corodinator completion participant registered on behalf of this coordinator
|
static SubordinateBACoordinator |
getRecoveredCoordinator(String coordinatorId) |
boolean |
isActivated() |
boolean |
isOrphaned()
test whether a transaction has been restored without its proxy participant.
|
static SubordinateBACoordinator[] |
listRecoveredCoordinators() |
static void |
removeActiveProxy(String id) |
protected static void |
removeRecoveredCoordinator(SubordinateBACoordinator coordinator) |
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, participantCannotComplete, participantCompleted, participantFaulted, qualifiers
addSynchronization, afterCompletion, afterCompletion, asyncAfterCompletion, beforeCompletion, getDeferredThrowable, getSynchronizations, running, start, start
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, restore_state, save_state, 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 String PARTICIPANT_PREFIX
public SubordinateBACoordinator()
public SubordinateBACoordinator(com.arjuna.ats.arjuna.common.Uid recovery)
recovery
- public Outcome coordinate(CompletionStatus cs) throws WrongStateException, ProtocolViolationException, SystemException
coordinate
in class BACoordinator
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 void complete() throws WrongStateException, SystemException
complete
in class BACoordinator
WrongStateException
- if the transaction is neither RUNNING nor PREPAREDSystemException
- if there are incomplete ParticipantCompletion participants or if one of the
CoordinatorCompletion participants fails to complete.public int close() throws SystemException
close
in class BACoordinator
SystemException
public int cancel()
cancel
in interface com.arjuna.ats.arjuna.coordinator.Reapable
cancel
in class BACoordinator
public void unknown()
public void error()
public String type()
type
in class BACoordinator
public String getCoordinatorCompletionParticipantid()
protected static void addRecoveredCoordinator(SubordinateBACoordinator coordinator)
protected static void removeRecoveredCoordinator(SubordinateBACoordinator coordinator)
public static void addActiveProxy(String id)
public static void removeActiveProxy(String id)
protected void setActivated()
public boolean isActivated()
public boolean isOrphaned()
public static SubordinateBACoordinator getRecoveredCoordinator(String coordinatorId)
public static SubordinateBACoordinator[] listRecoveredCoordinators()
public static void addCallback(String key, SubordinateBACoordinator.SubordinateCallback callback)
key
- callback
- Copyright © 2016 JBoss by Red Hat. All rights reserved.