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 Details

    • ISOLATION_LEVEL_UNSPECIFIED

      public static final TransactionOptions.IsolationLevel ISOLATION_LEVEL_UNSPECIFIED
       Default value.
      
       If the value is not specified, the `SERIALIZABLE` isolation level is
       used.
       
      ISOLATION_LEVEL_UNSPECIFIED = 0;
    • SERIALIZABLE

      public static final TransactionOptions.IsolationLevel 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

      public static final TransactionOptions.IsolationLevel 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

      public static final TransactionOptions.IsolationLevel UNRECOGNIZED
  • Field Details

    • ISOLATION_LEVEL_UNSPECIFIED_VALUE

      public static final int ISOLATION_LEVEL_UNSPECIFIED_VALUE
       Default 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_VALUE
       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;
      See Also:
    • REPEATABLE_READ_VALUE

      public static final int REPEATABLE_READ_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. 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

      public static TransactionOptions.IsolationLevel[] 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

      public static TransactionOptions.IsolationLevel 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 name
      NullPointerException - if the argument is null
    • getNumber

      public final int getNumber()
      Specified by:
      getNumber in interface com.google.protobuf.Internal.EnumLite
      Specified by:
      getNumber in interface com.google.protobuf.ProtocolMessageEnum
    • valueOf

      @Deprecated public static TransactionOptions.IsolationLevel valueOf(int value)
      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 name
      NullPointerException - if the argument is null
    • forNumber

      public static TransactionOptions.IsolationLevel forNumber(int value)
      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:
      getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnum
    • getDescriptorForType

      public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.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 name
      NullPointerException - if the argument is null