Enum AttemptStates
- java.lang.Object
-
- java.lang.Enum<AttemptStates>
-
- com.couchbase.transactions.support.AttemptStates
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<AttemptStates>
public enum AttemptStates extends java.lang.Enum<AttemptStates>
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 AttemptStates
convert(java.lang.String input)
static AttemptStates
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static AttemptStates[]
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 AttemptStates 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 AttemptStates PENDING
Any call to one of the mutation methods -insert
,replace
,remove
- will update the state to PENDING.
-
ABORTED
public static final AttemptStates ABORTED
Set once the Active Transaction Record entry for this transaction has been updated to mark the transaction as Aborted.
-
COMMITTED
public static final AttemptStates COMMITTED
Set once the Active Transaction Record entry for this transaction has been updated to mark the transaction as Committed.
-
COMPLETED
public static final AttemptStates COMPLETED
Set once the commit is fully completed.
-
ROLLED_BACK
public static final AttemptStates ROLLED_BACK
Set once the commit is fully rolled back.
-
UNKNOWN
public static final AttemptStates UNKNOWN
A state this client doesn't recognise.
-
-
Method Detail
-
values
public static AttemptStates[] 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 (AttemptStates c : AttemptStates.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AttemptStates valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
convert
public static AttemptStates convert(java.lang.String input)
-
-