Enum TransactionRetryListener.RetryResult
- java.lang.Object
-
- java.lang.Enum<TransactionRetryListener.RetryResult>
-
- com.google.cloud.spanner.connection.TransactionRetryListener.RetryResult
-
- All Implemented Interfaces:
Serializable
,Comparable<TransactionRetryListener.RetryResult>
- Enclosing interface:
- TransactionRetryListener
@InternalApi public static enum TransactionRetryListener.RetryResult extends Enum<TransactionRetryListener.RetryResult>
The result of a retry.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description RETRY_ABORTED_AND_MAX_ATTEMPTS_EXCEEDED
The retry was aborted by Spanner and the maximum number of retry attempts allowed has been exceeded.RETRY_ABORTED_AND_RESTARTING
The retry was aborted by Spanner and another retry attempt will be started.RETRY_ABORTED_DUE_TO_CONCURRENT_MODIFICATION
The retry was aborted by theConnection
because of a concurrent modification.RETRY_ERROR
An unexpected error occurred during transaction retry, the transaction cannot continue and will throw an exception.RETRY_SUCCESSFUL
The retry executed successfully and the transaction will continue.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TransactionRetryListener.RetryResult
valueOf(String name)
Returns the enum constant of this type with the specified name.static TransactionRetryListener.RetryResult[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
RETRY_SUCCESSFUL
public static final TransactionRetryListener.RetryResult RETRY_SUCCESSFUL
The retry executed successfully and the transaction will continue.
-
RETRY_ABORTED_AND_RESTARTING
public static final TransactionRetryListener.RetryResult RETRY_ABORTED_AND_RESTARTING
The retry was aborted by Spanner and another retry attempt will be started.
-
RETRY_ABORTED_DUE_TO_CONCURRENT_MODIFICATION
public static final TransactionRetryListener.RetryResult RETRY_ABORTED_DUE_TO_CONCURRENT_MODIFICATION
The retry was aborted by theConnection
because of a concurrent modification. The transaction cannot continue and will throw anAbortedDueToConcurrentModificationException
.
-
RETRY_ABORTED_AND_MAX_ATTEMPTS_EXCEEDED
public static final TransactionRetryListener.RetryResult RETRY_ABORTED_AND_MAX_ATTEMPTS_EXCEEDED
The retry was aborted by Spanner and the maximum number of retry attempts allowed has been exceeded. The transaction cannot continue and will throw anAbortedException
.
-
RETRY_ERROR
public static final TransactionRetryListener.RetryResult RETRY_ERROR
An unexpected error occurred during transaction retry, the transaction cannot continue and will throw an exception.
-
-
Method Detail
-
values
public static TransactionRetryListener.RetryResult[] 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 (TransactionRetryListener.RetryResult c : TransactionRetryListener.RetryResult.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TransactionRetryListener.RetryResult 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
-
-