Enum AttemptState
- java.lang.Object
-
- java.lang.Enum<AttemptState>
-
- com.couchbase.client.core.transaction.support.AttemptState
-
- All Implemented Interfaces:
Serializable
,Comparable<AttemptState>
@Internal public enum AttemptState extends Enum<AttemptState>
The possible states for a transaction attempt.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ABORTED
Set once the Active Transaction Record entry for this transaction has been updated to mark the transaction as Aborted.COMMITTED
Set once the Active Transaction Record entry for this transaction has been updated to mark the transaction as Committed.COMPLETED
Set once the commit is fully completed.NOT_STARTED
The attempt did not create an ATR entry.PENDING
Any call to one of the mutation methods -insert
,replace
,remove
- will update the state to PENDING.ROLLED_BACK
Set once the commit is fully rolled back.UNKNOWN
A state this client doesn't recognise.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AttemptState
convert(String input)
static AttemptState
valueOf(String name)
Returns the enum constant of this type with the specified name.static AttemptState[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NOT_STARTED
public static final AttemptState NOT_STARTED
The attempt did not create an ATR entry. This generally, but not always, implies a failure state - e.g. the ATR entry could not be written. But, it could have been a successful read-only transaction. The ATR entry is only created for write transactions.
-
PENDING
public static final AttemptState PENDING
Any call to one of the mutation methods -insert
,replace
,remove
- will update the state to PENDING.
-
ABORTED
public static final AttemptState ABORTED
Set once the Active Transaction Record entry for this transaction has been updated to mark the transaction as Aborted.
-
COMMITTED
public static final AttemptState COMMITTED
Set once the Active Transaction Record entry for this transaction has been updated to mark the transaction as Committed.
-
COMPLETED
public static final AttemptState COMPLETED
Set once the commit is fully completed.
-
ROLLED_BACK
public static final AttemptState ROLLED_BACK
Set once the commit is fully rolled back.
-
UNKNOWN
public static final AttemptState UNKNOWN
A state this client doesn't recognise.
-
-
Method Detail
-
values
public static AttemptState[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AttemptState c : AttemptState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AttemptState 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 nameNullPointerException
- if the argument is null
-
convert
public static AttemptState convert(String input)
-
-