Package com.google.spanner.v1
Class TransactionOptions.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.Builder>
com.google.spanner.v1.TransactionOptions.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,TransactionOptionsOrBuilder,Cloneable
- Enclosing class:
- TransactionOptions
public static final class TransactionOptions.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.Builder>
implements TransactionOptionsOrBuilder
Options to use for transactions.Protobuf type
google.spanner.v1.TransactionOptions-
Method Summary
Modifier and TypeMethodDescriptionaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear()When `exclude_txn_from_change_streams` is set to `true`, it prevents read or write transactions from being tracked in change streamsclearField(com.google.protobuf.Descriptors.FieldDescriptor field) Isolation level for the transaction.clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) Partitioned DML transaction.Transaction does not write.Transaction may write.clone()static final com.google.protobuf.Descriptors.Descriptorcom.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.Partitioned DML transaction.Partitioned DML transaction.Partitioned DML transaction.Transaction does not write.Transaction does not write.Transaction does not write.Transaction may write.Transaction may write.Transaction may write.booleanPartitioned DML transaction.booleanTransaction does not write.booleanTransaction may write.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(TransactionOptions other) Partitioned DML transaction.Transaction does not write.Transaction may write.mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) setExcludeTxnFromChangeStreams(boolean value) When `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.setIsolationLevelValue(int value) Isolation level for the transaction.Partitioned DML transaction.setPartitionedDml(TransactionOptions.PartitionedDml.Builder builderForValue) Partitioned DML transaction.Transaction does not write.setReadOnly(TransactionOptions.ReadOnly.Builder builderForValue) Transaction does not write.Transaction may write.setReadWrite(TransactionOptions.ReadWrite.Builder builderForValue) Transaction may write.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
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.Builder<TransactionOptions.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.Builder>
-
setField
public TransactionOptions.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.Builder>
-
setRepeatedField
public TransactionOptions.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.Builder>
-
addRepeatedField
public TransactionOptions.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<TransactionOptions.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.Builder>
-
mergeFrom
public TransactionOptions.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<TransactionOptions.Builder>- Throws:
IOException
-
getModeCase
- Specified by:
getModeCasein interfaceTransactionOptionsOrBuilder
-
clearMode
-
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.
-
setReadWrite
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; -
setReadWrite
public TransactionOptions.Builder setReadWrite(TransactionOptions.ReadWrite.Builder builderForValue) 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; -
mergeReadWrite
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; -
clearReadWrite
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; -
getReadWriteBuilder
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; -
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.
-
setPartitionedDml
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; -
setPartitionedDml
public TransactionOptions.Builder setPartitionedDml(TransactionOptions.PartitionedDml.Builder builderForValue) 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; -
mergePartitionedDml
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; -
clearPartitionedDml
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; -
getPartitionedDmlBuilder
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; -
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.
-
setReadOnly
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; -
setReadOnly
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; -
mergeReadOnly
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; -
clearReadOnly
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; -
getReadOnlyBuilder
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; -
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.
-
setExcludeTxnFromChangeStreams
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;- Parameters:
value- The excludeTxnFromChangeStreams to set.- Returns:
- This builder for chaining.
-
clearExcludeTxnFromChangeStreams
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;- Returns:
- This builder for chaining.
-
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.
-
setIsolationLevelValue
Isolation level for the transaction.
.google.spanner.v1.TransactionOptions.IsolationLevel isolation_level = 6;- Parameters:
value- The enum numeric value on the wire for isolationLevel to set.- Returns:
- This builder for chaining.
-
getIsolationLevel
Isolation level for the transaction.
.google.spanner.v1.TransactionOptions.IsolationLevel isolation_level = 6;- Specified by:
getIsolationLevelin interfaceTransactionOptionsOrBuilder- Returns:
- The isolationLevel.
-
setIsolationLevel
Isolation level for the transaction.
.google.spanner.v1.TransactionOptions.IsolationLevel isolation_level = 6;- Parameters:
value- The isolationLevel to set.- Returns:
- This builder for chaining.
-
clearIsolationLevel
Isolation level for the transaction.
.google.spanner.v1.TransactionOptions.IsolationLevel isolation_level = 6;- Returns:
- This builder for chaining.
-
setUnknownFields
public final TransactionOptions.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.Builder>
-
mergeUnknownFields
public final TransactionOptions.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.Builder>
-