public enum ParticipantStatus extends Enum<ParticipantStatus>
Active
is entered when a participant is first
associated with a Long Running Action.
The state Compensating
is entered when a compensate
notification is received (which indicates that the associated
LRA was cancelled). The transition to end state Compensated
should occur when the participant has compensated for any actions
it performed when the LRA was executing. If compensation is not,
and will never be, possible then the final state of FailedToCompensate
is entered and the participant cannot leave this state until it receives
a Forget
notification.
The state Completing
is entered when a complete
notification is received (which indicates that the associated
LRA was closed). This state is followed by the Completed
or FailedToComplete
state depending upon whether the participant
was or was not able to tidy up.
Note that a particant can leave this state model via the Leave
annotation provided that the associated LRA is in the state
LRAStatus.Active
.
The name value of the enum should be returned by participant methods marked
with the Status
, Compensate
and Complete
annotations.Enum Constant and Description |
---|
Active
The participant has not yet been asked to Complete or Compensate
|
Compensated
The participant has successfully compensated for any work it performed
|
Compensating
The participant is currently compensating for any work it performed
|
Completed
The participant has confirmed that is has completed any tidy-up actions
|
Completing
The participant is tidying up after being told to complete
|
FailedToCompensate
The participant was not able to compensate for the work it performed (and it must
remember it could not compensate until such time that it receives a forget
message (
Forget ) |
FailedToComplete
The participant was unable to tidy-up
|
Modifier and Type | Method and Description |
---|---|
static ParticipantStatus |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ParticipantStatus[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ParticipantStatus Active
public static final ParticipantStatus Compensating
public static final ParticipantStatus Compensated
public static final ParticipantStatus FailedToCompensate
Forget
)public static final ParticipantStatus Completing
public static final ParticipantStatus Completed
public static final ParticipantStatus FailedToComplete
public static ParticipantStatus[] values()
for (ParticipantStatus c : ParticipantStatus.values()) System.out.println(c);
public static ParticipantStatus valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2018 – 2021 Eclipse Foundation. All rights reserved.
Use is subject to license terms.