Package com.google.spanner.v1
Enum TransactionOptions.IsolationLevel
java.lang.Object
java.lang.Enum<TransactionOptions.IsolationLevel>
com.google.spanner.v1.TransactionOptions.IsolationLevel
- All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite,com.google.protobuf.ProtocolMessageEnum,Serializable,Comparable<TransactionOptions.IsolationLevel>
- Enclosing class:
- TransactionOptions
public static enum TransactionOptions.IsolationLevel
extends Enum<TransactionOptions.IsolationLevel>
implements com.google.protobuf.ProtocolMessageEnum
`IsolationLevel` is used when setting `isolation_level` for a transaction.Protobuf enum
google.spanner.v1.TransactionOptions.IsolationLevel-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDefault value.All reads performed during the transaction observe a consistent snapshot of the database, and the transaction is only successfully committed in the absence of conflicts between its updates and any concurrent updates that have occurred since that snapshot.All transactions appear as if they executed in a serial order, even if some of the reads, writes, and other operations of distinct transactions actually occurred in parallel. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault value.static final intAll reads performed during the transaction observe a consistent snapshot of the database, and the transaction is only successfully committed in the absence of conflicts between its updates and any concurrent updates that have occurred since that snapshot.static final intAll transactions appear as if they executed in a serial order, even if some of the reads, writes, and other operations of distinct transactions actually occurred in parallel. -
Method Summary
Modifier and TypeMethodDescriptionforNumber(int value) static final com.google.protobuf.Descriptors.EnumDescriptorfinal com.google.protobuf.Descriptors.EnumDescriptorfinal intfinal com.google.protobuf.Descriptors.EnumValueDescriptorstatic com.google.protobuf.Internal.EnumLiteMap<TransactionOptions.IsolationLevel>valueOf(int value) Deprecated.valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) Returns the enum constant of this type with the specified name.Returns the enum constant of this type with the specified name.static TransactionOptions.IsolationLevel[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
ISOLATION_LEVEL_UNSPECIFIED
Default value. If the value is not specified, the `SERIALIZABLE` isolation level is used.
ISOLATION_LEVEL_UNSPECIFIED = 0; -
SERIALIZABLE
All transactions appear as if they executed in a serial order, even if some of the reads, writes, and other operations of distinct transactions actually occurred in parallel. Spanner assigns commit timestamps that reflect the order of committed transactions to implement this property. Spanner offers a stronger guarantee than serializability called external consistency. For further details, please refer to https://cloud.google.com/spanner/docs/true-time-external-consistency#serializability.
SERIALIZABLE = 1; -
REPEATABLE_READ
All reads performed during the transaction observe a consistent snapshot of the database, and the transaction is only successfully committed in the absence of conflicts between its updates and any concurrent updates that have occurred since that snapshot. Consequently, in contrast to `SERIALIZABLE` transactions, only write-write conflicts are detected in snapshot transactions. This isolation level does not support Read-only and Partitioned DML transactions. When `REPEATABLE_READ` is specified on a read-write transaction, the locking semantics default to `OPTIMISTIC`.
REPEATABLE_READ = 2; -
UNRECOGNIZED
-
-
Field Details
-
ISOLATION_LEVEL_UNSPECIFIED_VALUE
public static final int ISOLATION_LEVEL_UNSPECIFIED_VALUEDefault value. If the value is not specified, the `SERIALIZABLE` isolation level is used.
ISOLATION_LEVEL_UNSPECIFIED = 0;- See Also:
-
SERIALIZABLE_VALUE
public static final int SERIALIZABLE_VALUEAll transactions appear as if they executed in a serial order, even if some of the reads, writes, and other operations of distinct transactions actually occurred in parallel. Spanner assigns commit timestamps that reflect the order of committed transactions to implement this property. Spanner offers a stronger guarantee than serializability called external consistency. For further details, please refer to https://cloud.google.com/spanner/docs/true-time-external-consistency#serializability.
SERIALIZABLE = 1;- See Also:
-
REPEATABLE_READ_VALUE
public static final int REPEATABLE_READ_VALUEAll reads performed during the transaction observe a consistent snapshot of the database, and the transaction is only successfully committed in the absence of conflicts between its updates and any concurrent updates that have occurred since that snapshot. Consequently, in contrast to `SERIALIZABLE` transactions, only write-write conflicts are detected in snapshot transactions. This isolation level does not support Read-only and Partitioned DML transactions. When `REPEATABLE_READ` is specified on a read-write transaction, the locking semantics default to `OPTIMISTIC`.
REPEATABLE_READ = 2;- See Also:
-
-
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
-
getNumber
public final int getNumber()- Specified by:
getNumberin interfacecom.google.protobuf.Internal.EnumLite- Specified by:
getNumberin interfacecom.google.protobuf.ProtocolMessageEnum
-
valueOf
Deprecated.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:
value- 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
-
forNumber
- Parameters:
value- The numeric wire value of the corresponding enum entry.- Returns:
- The enum associated with the given numeric wire value.
-
internalGetValueMap
public static com.google.protobuf.Internal.EnumLiteMap<TransactionOptions.IsolationLevel> internalGetValueMap() -
getValueDescriptor
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()- Specified by:
getValueDescriptorin interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptorForType
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptor
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() -
valueOf
public static TransactionOptions.IsolationLevel valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) 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:
desc- 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
-