Enum Class Transaction.Lifecycle
java.lang.Object
java.lang.Enum<Transaction.Lifecycle>
net.neoforged.neoforge.transfer.transaction.Transaction.Lifecycle
- All Implemented Interfaces:
Serializable, Comparable<Transaction.Lifecycle>, Constable
- Enclosing class:
Transaction
The different possible states of the transaction stack.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe current transaction is currently being closed.No transaction is currently open or closing.A transaction is currently open.SnapshotJournal.onRootCommit(T)callbacks are being executed, and no transaction is currently open or being closed. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Transaction.LifecycleReturns the enum constant of this class with the specified name.static Transaction.Lifecycle[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
No transaction is currently open or closing. -
OPEN
A transaction is currently open. -
CLOSING
The current transaction is currently being closed. -
ROOT_CLOSING
SnapshotJournal.onRootCommit(T)callbacks are being executed, and no transaction is currently open or being closed.
-
-
Constructor Details
-
Lifecycle
private Lifecycle()
-
-
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
-