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.
|
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.
|
ATCoordinator |
createSubordinate(String subordinateType)
Create a subordinate transaction, i.e., one which can be driven
through prepare, commit and rollback.
|
ATCoordinator |
currentCoordinator() |
void |
delistParticipant(Participant act)
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 |
participantReadOnly(String participantId) |
void |
participantRolledBack(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
CompletionStatus
- cs The completion status to use.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
CompletionStatus
- 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
Participant
- 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(Participant act) 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 enlistSynchronization(Synchronization act) throws WrongStateException, DuplicateSynchronizationException, InvalidSynchronizationException, NoCoordinatorException, SystemException
Synchronization
- act The synchronization to remove.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.NoCoordinatorException
public void delistSynchronization(Synchronization act) throws InvalidSynchronizationException, NoCoordinatorException, 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.NoCoordinatorException
public void participantRolledBack(String participantId) throws NoActivityException, InvalidParticipantException, WrongStateException, SystemException
public void participantReadOnly(String participantId) throws NoActivityException, InvalidParticipantException, SystemException
public final ATCoordinator createSubordinate(String subordinateType) throws SystemException
SystemException
- throw if any error occurs.public final ATCoordinator currentCoordinator() throws NoCoordinatorException, SystemException
Copyright © 2019 JBoss by Red Hat. All rights reserved.