public class BACoordinator
extends com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator
Constructor and Description |
---|
BACoordinator() |
BACoordinator(com.arjuna.ats.arjuna.common.Uid recovery) |
Modifier and Type | Method and Description |
---|---|
int |
cancel()
cancel the activity
|
int |
close()
close the activity
|
void |
complete()
ensure all ParticipantCompletion participants have completed and then send a complete message to
any remaining CoordinatorCompletion 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.
|
void |
delistParticipant(String participantId)
Remove the specified participant from the coordinator's list.
|
void |
delistSynchronization(Synchronization act)
Remove the specified synchronization from the coordinator's list.
|
void |
enlistParticipant(Participant act)
Enrol the specified participant with the coordinator associated with the
current thread.
|
void |
enlistSynchronization(Synchronization act)
Enrol the specified synchronization with the coordinator associated with
the current thread.
|
CoordinatorId |
identifier() |
void |
participantCannotComplete(String participantId) |
void |
participantCompleted(String participantId) |
void |
participantFaulted(String participantId) |
Qualifier[] |
qualifiers() |
String |
type() |
addSynchronization, afterCompletion, afterCompletion, asyncAfterCompletion, beforeCompletion, end, 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 BACoordinator()
public BACoordinator(com.arjuna.ats.arjuna.common.Uid recovery)
public Outcome coordinate(CompletionStatus cs) throws WrongStateException, ProtocolViolationException, SystemException
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 void complete() throws WrongStateException, SystemException
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
SystemException
public int cancel()
cancel
in interface com.arjuna.ats.arjuna.coordinator.Reapable
cancel
in class com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator
public void enlistParticipant(Participant act) throws WrongStateException, DuplicateParticipantException, InvalidParticipantException, SystemException
WrongStateException
- Thrown if the coordinator is not in a state that allows
participants to be enrolled.DuplicateParticipantException
- Thrown if the participant has already been enrolled and
the coordination protocol does not support multiple
entries.InvalidParticipantException
- Thrown if the participant is invalid.SystemException
- Thrown if any other error occurs.public void delistParticipant(String participantId) throws InvalidParticipantException, WrongStateException, SystemException
InvalidParticipantException
- Thrown if the participant is not known of by the
coordinator.WrongStateException
- Thrown if the state of the coordinator does not allow the
participant to be removedSystemException
- Thrown if any other error occurs.public void participantCompleted(String participantId) throws InvalidParticipantException, WrongStateException, SystemException
public void participantFaulted(String participantId) throws InvalidParticipantException, SystemException
public void participantCannotComplete(String participantId) throws InvalidParticipantException, WrongStateException, SystemException
public void enlistSynchronization(Synchronization act) throws WrongStateException, DuplicateSynchronizationException, InvalidSynchronizationException, SystemException
act
- The synchronization to add.WrongStateException
- Thrown if the coordinator is not in a state that allows
participants to be enrolled.DuplicateSynchronizationException
- Thrown if the participant has already been enrolled and
the coordination protocol does not support multiple
entries.InvalidSynchronizationException
- Thrown if the participant is invalid.SystemException
- Thrown if any other error occurs.public void delistSynchronization(Synchronization act) throws InvalidSynchronizationException, WrongStateException, SystemException
InvalidSynchronizationException
- Thrown if the participant is not known of by the
coordinator.WrongStateException
- Thrown if the state of the coordinator does not allow the
participant to be removed (e.g., in a two-phase protocol
the coordinator is committing.)SystemException
- Thrown if any other error occurs.public Qualifier[] qualifiers() throws SystemException
SystemException
- Thrown if any error occurs.public CoordinatorId identifier() throws SystemException
SystemException
- Thrown if any error occurs.public String type()
type
in class com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator
Copyright © 2016 JBoss by Red Hat. All rights reserved.