public class CoordinatorControl extends Object
Constructor and Description |
---|
CoordinatorControl() |
Modifier and Type | Method and Description |
---|---|
void |
begin()
An activity has begun and is active on the current thread.
|
void |
complete()
The current activity is completing and informs the participants
that all work they need to know about has been received.
|
Outcome |
complete(CompletionStatus cs)
The current activity is completing with the specified completion status.
|
void |
completed()
The activity has completed and is no longer active on the current
thread.
|
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.
|
BACoordinator |
createSubordinate()
Create a subordinate transaction, i.e., one which can be driven
through complete, close and cancel.
|
BACoordinator |
currentCoordinator() |
void |
delistParticipant(String participantId)
Remove the specified participant from the coordinator's list.
|
void |
enlistParticipant(Participant act)
Enrol the specified participant with the coordinator associated with
the current thread.
|
CoordinatorId |
identifier() |
void |
participantCannotComplete(String participantId) |
void |
participantCompleted(String participantId) |
void |
participantFaulted(String participantId) |
Qualifier[] |
qualifiers()
Not supported by basic ArjunaCore.
|
void |
resume()
The activity has been resumed on the current thread.
|
Status |
status() |
void |
suspend()
The activity has been suspended.
|
public void begin() throws SystemException
SystemException
public Outcome complete(CompletionStatus cs) throws SystemException
cs
- The completion status to use.SystemException
public void complete() throws WrongStateException, SystemException
WrongStateException
SystemException
public void suspend() throws SystemException
SystemException
public void resume() throws SystemException
SystemException
public void completed() throws SystemException
SystemException
public Outcome coordinate(CompletionStatus cs) throws WrongStateException, ProtocolViolationException, SystemException
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 Status status() throws SystemException
SystemException
- Thrown if any error occurs.Status
public Qualifier[] qualifiers() throws NoCoordinatorException, SystemException
SystemException
- Thrown if any error occurs.NoCoordinatorException
public CoordinatorId identifier() throws NoCoordinatorException, SystemException
SystemException
- Thrown if any error occurs.NoCoordinatorException
public void enlistParticipant(Participant act) throws WrongStateException, DuplicateParticipantException, InvalidParticipantException, NoCoordinatorException, SystemException
act
- The participant.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.NoCoordinatorException
public void delistParticipant(String participantId) throws InvalidParticipantException, NoCoordinatorException, 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 removed (e.g., in a two-phase
protocol the coordinator is committing.)SystemException
- Thrown if any other error occurs.NoCoordinatorException
public void participantCompleted(String participantId) throws NoActivityException, InvalidParticipantException, WrongStateException, SystemException
public void participantFaulted(String participantId) throws NoActivityException, InvalidParticipantException, SystemException
public void participantCannotComplete(String participantId) throws NoActivityException, InvalidParticipantException, WrongStateException, SystemException
public final BACoordinator createSubordinate() throws SystemException
SystemException
- throw if any error occurs.public final BACoordinator currentCoordinator() throws NoCoordinatorException, SystemException
Copyright © 2021 JBoss by Red Hat. All rights reserved.