Package com.google.spanner.v1
Class TransactionOptions
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
com.google.spanner.v1.TransactionOptions
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,TransactionOptionsOrBuilder,Serializable
public final class TransactionOptions
extends com.google.protobuf.GeneratedMessageV3
implements TransactionOptionsOrBuilder
Options to use for transactions.Protobuf type
google.spanner.v1.TransactionOptions- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classOptions to use for transactions.static enum`IsolationLevel` is used when setting `isolation_level` for a transaction.static enumstatic final classMessage type to initiate a Partitioned DML transaction.static interfacestatic final classMessage type to initiate a read-only transaction.static interfacestatic final classMessage type to initiate a read-write transaction.static interfaceNested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessageV3
alwaysUseFieldBuilders, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic TransactionOptionsstatic final com.google.protobuf.Descriptors.DescriptorbooleanWhen `exclude_txn_from_change_streams` is set to `true`, it prevents read or write transactions from being tracked in change streamsIsolation level for the transaction.intIsolation level for the transaction.com.google.protobuf.Parser<TransactionOptions>Partitioned DML transaction.Partitioned DML transaction.Transaction does not write.Transaction does not write.Transaction may write.Transaction may write.intinthashCode()booleanPartitioned DML transaction.booleanTransaction does not write.booleanTransaction may write.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanstatic TransactionOptions.Builderstatic TransactionOptions.BuildernewBuilder(TransactionOptions prototype) protected TransactionOptions.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) static TransactionOptionsparseDelimitedFrom(InputStream input) static TransactionOptionsparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TransactionOptionsparseFrom(byte[] data) static TransactionOptionsparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TransactionOptionsparseFrom(com.google.protobuf.ByteString data) static TransactionOptionsparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TransactionOptionsparseFrom(com.google.protobuf.CodedInputStream input) static TransactionOptionsparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TransactionOptionsparseFrom(InputStream input) static TransactionOptionsparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TransactionOptionsparseFrom(ByteBuffer data) static TransactionOptionsparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<TransactionOptions>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
READ_WRITE_FIELD_NUMBER
public static final int READ_WRITE_FIELD_NUMBER- See Also:
-
PARTITIONED_DML_FIELD_NUMBER
public static final int PARTITIONED_DML_FIELD_NUMBER- See Also:
-
READ_ONLY_FIELD_NUMBER
public static final int READ_ONLY_FIELD_NUMBER- See Also:
-
EXCLUDE_TXN_FROM_CHANGE_STREAMS_FIELD_NUMBER
public static final int EXCLUDE_TXN_FROM_CHANGE_STREAMS_FIELD_NUMBER- See Also:
-
ISOLATION_LEVEL_FIELD_NUMBER
public static final int ISOLATION_LEVEL_FIELD_NUMBER- See Also:
-
-
Method Details
-
newInstance
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getModeCase
- Specified by:
getModeCasein interfaceTransactionOptionsOrBuilder
-
hasReadWrite
public boolean hasReadWrite()Transaction may write. Authorization to begin a read-write transaction requires `spanner.databases.beginOrRollbackReadWriteTransaction` permission on the `session` resource.
.google.spanner.v1.TransactionOptions.ReadWrite read_write = 1;- Specified by:
hasReadWritein interfaceTransactionOptionsOrBuilder- Returns:
- Whether the readWrite field is set.
-
getReadWrite
Transaction may write. Authorization to begin a read-write transaction requires `spanner.databases.beginOrRollbackReadWriteTransaction` permission on the `session` resource.
.google.spanner.v1.TransactionOptions.ReadWrite read_write = 1;- Specified by:
getReadWritein interfaceTransactionOptionsOrBuilder- Returns:
- The readWrite.
-
getReadWriteOrBuilder
Transaction may write. Authorization to begin a read-write transaction requires `spanner.databases.beginOrRollbackReadWriteTransaction` permission on the `session` resource.
.google.spanner.v1.TransactionOptions.ReadWrite read_write = 1;- Specified by:
getReadWriteOrBuilderin interfaceTransactionOptionsOrBuilder
-
hasPartitionedDml
public boolean hasPartitionedDml()Partitioned DML transaction. Authorization to begin a Partitioned DML transaction requires `spanner.databases.beginPartitionedDmlTransaction` permission on the `session` resource.
.google.spanner.v1.TransactionOptions.PartitionedDml partitioned_dml = 3;- Specified by:
hasPartitionedDmlin interfaceTransactionOptionsOrBuilder- Returns:
- Whether the partitionedDml field is set.
-
getPartitionedDml
Partitioned DML transaction. Authorization to begin a Partitioned DML transaction requires `spanner.databases.beginPartitionedDmlTransaction` permission on the `session` resource.
.google.spanner.v1.TransactionOptions.PartitionedDml partitioned_dml = 3;- Specified by:
getPartitionedDmlin interfaceTransactionOptionsOrBuilder- Returns:
- The partitionedDml.
-
getPartitionedDmlOrBuilder
Partitioned DML transaction. Authorization to begin a Partitioned DML transaction requires `spanner.databases.beginPartitionedDmlTransaction` permission on the `session` resource.
.google.spanner.v1.TransactionOptions.PartitionedDml partitioned_dml = 3;- Specified by:
getPartitionedDmlOrBuilderin interfaceTransactionOptionsOrBuilder
-
hasReadOnly
public boolean hasReadOnly()Transaction does not write. Authorization to begin a read-only transaction requires `spanner.databases.beginReadOnlyTransaction` permission on the `session` resource.
.google.spanner.v1.TransactionOptions.ReadOnly read_only = 2;- Specified by:
hasReadOnlyin interfaceTransactionOptionsOrBuilder- Returns:
- Whether the readOnly field is set.
-
getReadOnly
Transaction does not write. Authorization to begin a read-only transaction requires `spanner.databases.beginReadOnlyTransaction` permission on the `session` resource.
.google.spanner.v1.TransactionOptions.ReadOnly read_only = 2;- Specified by:
getReadOnlyin interfaceTransactionOptionsOrBuilder- Returns:
- The readOnly.
-
getReadOnlyOrBuilder
Transaction does not write. Authorization to begin a read-only transaction requires `spanner.databases.beginReadOnlyTransaction` permission on the `session` resource.
.google.spanner.v1.TransactionOptions.ReadOnly read_only = 2;- Specified by:
getReadOnlyOrBuilderin interfaceTransactionOptionsOrBuilder
-
getExcludeTxnFromChangeStreams
public boolean getExcludeTxnFromChangeStreams()When `exclude_txn_from_change_streams` is set to `true`, it prevents read or write transactions from being tracked in change streams. * If the DDL option `allow_txn_exclusion` is set to `true`, then the updates made within this transaction aren't recorded in the change stream. * If you don't set the DDL option `allow_txn_exclusion` or if it's set to `false`, then the updates made within this transaction are recorded in the change stream. When `exclude_txn_from_change_streams` is set to `false` or not set, modifications from this transaction are recorded in all change streams that are tracking columns modified by these transactions. The `exclude_txn_from_change_streams` option can only be specified for read-write or partitioned DML transactions, otherwise the API returns an `INVALID_ARGUMENT` error.
bool exclude_txn_from_change_streams = 5;- Specified by:
getExcludeTxnFromChangeStreamsin interfaceTransactionOptionsOrBuilder- Returns:
- The excludeTxnFromChangeStreams.
-
getIsolationLevelValue
public int getIsolationLevelValue()Isolation level for the transaction.
.google.spanner.v1.TransactionOptions.IsolationLevel isolation_level = 6;- Specified by:
getIsolationLevelValuein interfaceTransactionOptionsOrBuilder- Returns:
- The enum numeric value on the wire for isolationLevel.
-
getIsolationLevel
Isolation level for the transaction.
.google.spanner.v1.TransactionOptions.IsolationLevel isolation_level = 6;- Specified by:
getIsolationLevelin interfaceTransactionOptionsOrBuilder- Returns:
- The isolationLevel.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static TransactionOptions parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TransactionOptions parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TransactionOptions parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TransactionOptions parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TransactionOptions parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TransactionOptions parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static TransactionOptions parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static TransactionOptions parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static TransactionOptions parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static TransactionOptions parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected TransactionOptions.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) - Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-