Enum Class Transaction.State
- All Implemented Interfaces:
Serializable, Comparable<Transaction.State>, Constable
- Enclosing interface:
Transaction
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionWhen a client receives a response to an abort, the transaction state is changed from `ABORTING` to `ABORTED`.When a client invokes an abort, the transaction state is changed from `OPEN` to `ABORTING`.When a client receives a response to a commit, the transaction state is changed from `COMMITTING` to `COMMITTED`.When a client invokes a commit, the transaction state is changed from `OPEN` to `COMMITTING`.When a client invokes a commit or an abort, but a transaction does not exist in a coordinator, then the state is changed to `ERROR`.When a transaction is in the `OPEN` state, messages can be produced and acked with this transaction.When a transaction is timed out and the transaction state is `OPEN`, then the transaction state is changed from `OPEN` to `TIME_OUT`. -
Method Summary
Modifier and TypeMethodDescriptionstatic Transaction.StateReturns the enum constant of this class with the specified name.static Transaction.State[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
OPEN
When a transaction is in the `OPEN` state, messages can be produced and acked with this transaction. When a transaction is in the `OPEN` state, it can commit or abort. -
COMMITTING
When a client invokes a commit, the transaction state is changed from `OPEN` to `COMMITTING`. -
ABORTING
When a client invokes an abort, the transaction state is changed from `OPEN` to `ABORTING`. -
COMMITTED
When a client receives a response to a commit, the transaction state is changed from `COMMITTING` to `COMMITTED`. -
ABORTED
When a client receives a response to an abort, the transaction state is changed from `ABORTING` to `ABORTED`. -
ERROR
When a client invokes a commit or an abort, but a transaction does not exist in a coordinator, then the state is changed to `ERROR`. When a client invokes a commit, but the transaction state in a coordinator is `ABORTED` or `ABORTING`, then the state is changed to `ERROR`. When a client invokes an abort, but the transaction state in a coordinator is `COMMITTED` or `COMMITTING`, then the state is changed to `ERROR`. -
TIME_OUT
When a transaction is timed out and the transaction state is `OPEN`, then the transaction state is changed from `OPEN` to `TIME_OUT`.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-