Enum ParticipantStatus

java.lang.Object
java.lang.Enum<ParticipantStatus>
org.eclipse.microprofile.lra.annotation.ParticipantStatus
All Implemented Interfaces:
Serializable, Comparable<ParticipantStatus>

public enum ParticipantStatus extends Enum<ParticipantStatus>
A representation of the status of a participant according to a participant state model: The initial state 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 Details

    • Active

      public static final ParticipantStatus Active
      The participant has not yet been asked to Complete or Compensate
    • Compensating

      public static final ParticipantStatus Compensating
      The participant is currently compensating for any work it performed
    • Compensated

      public static final ParticipantStatus Compensated
      The participant has successfully compensated for any work it performed
    • FailedToCompensate

      public static final ParticipantStatus 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)
    • Completing

      public static final ParticipantStatus Completing
      The participant is tidying up after being told to complete
    • Completed

      public static final ParticipantStatus Completed
      The participant has confirmed that is has completed any tidy-up actions
    • FailedToComplete

      public static final ParticipantStatus FailedToComplete
      The participant was unable to tidy-up
  • Method Details

    • values

      public static ParticipantStatus[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ParticipantStatus valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null