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 ConstantDescriptionThe retry was aborted by Spanner and the maximum number of retry attempts allowed has been exceeded.The retry was aborted by Spanner and another retry attempt will be started.The retry was aborted by theConnection
because of a concurrent modification.An unexpected error occurred during transaction retry, the transaction cannot continue and will throw an exception.The retry executed successfully and the transaction will continue. -
Method Summary
Modifier and TypeMethodDescriptionReturns 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 Details
-
RETRY_SUCCESSFUL
The retry executed successfully and the transaction will continue. -
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_MODIFICATIONThe retry was aborted by theConnection
because of a concurrent modification. The transaction cannot continue and will throw anAbortedDueToConcurrentModificationException
. -
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
An unexpected error occurred during transaction retry, the transaction cannot continue and will throw an exception.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-