Class CommitRequest.Builder (6.72.0)

public static final class CommitRequest.Builder extends GeneratedMessageV3.Builder<CommitRequest.Builder> implements CommitRequestOrBuilder

The request for Commit.

Protobuf type google.spanner.v1.CommitRequest

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllMutations(Iterable<? extends Mutation> values)

public CommitRequest.Builder addAllMutations(Iterable<? extends Mutation> values)

The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list.

repeated .google.spanner.v1.Mutation mutations = 4;

Parameter
Name Description
values Iterable<? extends com.google.spanner.v1.Mutation>
Returns
Type Description
CommitRequest.Builder

addMutations(Mutation value)

public CommitRequest.Builder addMutations(Mutation value)

The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list.

repeated .google.spanner.v1.Mutation mutations = 4;

Parameter
Name Description
value Mutation
Returns
Type Description
CommitRequest.Builder

addMutations(Mutation.Builder builderForValue)

public CommitRequest.Builder addMutations(Mutation.Builder builderForValue)

The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list.

repeated .google.spanner.v1.Mutation mutations = 4;

Parameter
Name Description
builderForValue Mutation.Builder
Returns
Type Description
CommitRequest.Builder

addMutations(int index, Mutation value)

public CommitRequest.Builder addMutations(int index, Mutation value)

The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list.

repeated .google.spanner.v1.Mutation mutations = 4;

Parameters
Name Description
index int
value Mutation
Returns
Type Description
CommitRequest.Builder

addMutations(int index, Mutation.Builder builderForValue)

public CommitRequest.Builder addMutations(int index, Mutation.Builder builderForValue)

The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list.

repeated .google.spanner.v1.Mutation mutations = 4;

Parameters
Name Description
index int
builderForValue Mutation.Builder
Returns
Type Description
CommitRequest.Builder

addMutationsBuilder()

public Mutation.Builder addMutationsBuilder()

The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list.

repeated .google.spanner.v1.Mutation mutations = 4;

Returns
Type Description
Mutation.Builder

addMutationsBuilder(int index)

public Mutation.Builder addMutationsBuilder(int index)

The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list.

repeated .google.spanner.v1.Mutation mutations = 4;

Parameter
Name Description
index int
Returns
Type Description
Mutation.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public CommitRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CommitRequest.Builder
Overrides

build()

public CommitRequest build()
Returns
Type Description
CommitRequest

buildPartial()

public CommitRequest buildPartial()
Returns
Type Description
CommitRequest

clear()

public CommitRequest.Builder clear()
Returns
Type Description
CommitRequest.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public CommitRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
CommitRequest.Builder
Overrides

clearMaxCommitDelay()

public CommitRequest.Builder clearMaxCommitDelay()

Optional. The amount of latency this request is willing to incur in order to improve throughput. If this field is not set, Spanner assumes requests are relatively latency sensitive and automatically determines an appropriate delay time. You can specify a batching delay value between 0 and 500 ms.

.google.protobuf.Duration max_commit_delay = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CommitRequest.Builder

clearMutations()

public CommitRequest.Builder clearMutations()

The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list.

repeated .google.spanner.v1.Mutation mutations = 4;

Returns
Type Description
CommitRequest.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public CommitRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
CommitRequest.Builder
Overrides

clearRequestOptions()

public CommitRequest.Builder clearRequestOptions()

Common options for this request.

.google.spanner.v1.RequestOptions request_options = 6;

Returns
Type Description
CommitRequest.Builder

clearReturnCommitStats()

public CommitRequest.Builder clearReturnCommitStats()

If true, then statistics related to the transaction will be included in the CommitResponse. Default value is false.

bool return_commit_stats = 5;

Returns
Type Description
CommitRequest.Builder

This builder for chaining.

clearSession()

public CommitRequest.Builder clearSession()

Required. The session in which the transaction to be committed is running.

string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
CommitRequest.Builder

This builder for chaining.

clearSingleUseTransaction()

public CommitRequest.Builder clearSingleUseTransaction()

Execute mutations in a temporary transaction. Note that unlike commit of a previously-started transaction, commit with a temporary transaction is non-idempotent. That is, if the CommitRequest is sent to Cloud Spanner more than once (for instance, due to retries in the application, or in the transport library), it is possible that the mutations are executed more than once. If this is undesirable, use BeginTransaction and Commit instead.

.google.spanner.v1.TransactionOptions single_use_transaction = 3;

Returns
Type Description
CommitRequest.Builder

clearTransaction()

public CommitRequest.Builder clearTransaction()
Returns
Type Description
CommitRequest.Builder

clearTransactionId()

public CommitRequest.Builder clearTransactionId()

Commit a previously-started transaction.

bytes transaction_id = 2;

Returns
Type Description
CommitRequest.Builder

This builder for chaining.

clone()

public CommitRequest.Builder clone()
Returns
Type Description
CommitRequest.Builder
Overrides

getDefaultInstanceForType()

public CommitRequest getDefaultInstanceForType()
Returns
Type Description
CommitRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getMaxCommitDelay()

public Duration getMaxCommitDelay()

Optional. The amount of latency this request is willing to incur in order to improve throughput. If this field is not set, Spanner assumes requests are relatively latency sensitive and automatically determines an appropriate delay time. You can specify a batching delay value between 0 and 500 ms.

.google.protobuf.Duration max_commit_delay = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Duration

The maxCommitDelay.

getMaxCommitDelayBuilder()

public Duration.Builder getMaxCommitDelayBuilder()

Optional. The amount of latency this request is willing to incur in order to improve throughput. If this field is not set, Spanner assumes requests are relatively latency sensitive and automatically determines an appropriate delay time. You can specify a batching delay value between 0 and 500 ms.

.google.protobuf.Duration max_commit_delay = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Builder

getMaxCommitDelayOrBuilder()

public DurationOrBuilder getMaxCommitDelayOrBuilder()

Optional. The amount of latency this request is willing to incur in order to improve throughput. If this field is not set, Spanner assumes requests are relatively latency sensitive and automatically determines an appropriate delay time. You can specify a batching delay value between 0 and 500 ms.

.google.protobuf.Duration max_commit_delay = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DurationOrBuilder

getMutations(int index)

public Mutation getMutations(int index)

The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list.

repeated .google.spanner.v1.Mutation mutations = 4;

Parameter
Name Description
index int
Returns
Type Description
Mutation

getMutationsBuilder(int index)

public Mutation.Builder getMutationsBuilder(int index)

The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list.

repeated .google.spanner.v1.Mutation mutations = 4;

Parameter
Name Description
index int
Returns
Type Description
Mutation.Builder

getMutationsBuilderList()

public List<Mutation.Builder> getMutationsBuilderList()

The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list.

repeated .google.spanner.v1.Mutation mutations = 4;

Returns
Type Description
List<Builder>

getMutationsCount()

public int getMutationsCount()

The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list.

repeated .google.spanner.v1.Mutation mutations = 4;

Returns
Type Description
int

getMutationsList()

public List<Mutation> getMutationsList()

The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list.

repeated .google.spanner.v1.Mutation mutations = 4;

Returns
Type Description
List<Mutation>

getMutationsOrBuilder(int index)

public MutationOrBuilder getMutationsOrBuilder(int index)

The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list.

repeated .google.spanner.v1.Mutation mutations = 4;

Parameter
Name Description
index int
Returns
Type Description
MutationOrBuilder

getMutationsOrBuilderList()

public List<? extends MutationOrBuilder> getMutationsOrBuilderList()

The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list.

repeated .google.spanner.v1.Mutation mutations = 4;

Returns
Type Description
List<? extends com.google.spanner.v1.MutationOrBuilder>

getRequestOptions()

public RequestOptions getRequestOptions()

Common options for this request.

.google.spanner.v1.RequestOptions request_options = 6;

Returns
Type Description
RequestOptions

The requestOptions.

getRequestOptionsBuilder()

public RequestOptions.Builder getRequestOptionsBuilder()

Common options for this request.

.google.spanner.v1.RequestOptions request_options = 6;

Returns
Type Description
RequestOptions.Builder

getRequestOptionsOrBuilder()

public RequestOptionsOrBuilder getRequestOptionsOrBuilder()

Common options for this request.

.google.spanner.v1.RequestOptions request_options = 6;

Returns
Type Description
RequestOptionsOrBuilder

getReturnCommitStats()

public boolean getReturnCommitStats()

If true, then statistics related to the transaction will be included in the CommitResponse. Default value is false.

bool return_commit_stats = 5;

Returns
Type Description
boolean

The returnCommitStats.

getSession()

public String getSession()

Required. The session in which the transaction to be committed is running.

string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The session.

getSessionBytes()

public ByteString getSessionBytes()

Required. The session in which the transaction to be committed is running.

string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for session.

getSingleUseTransaction()

public TransactionOptions getSingleUseTransaction()

Execute mutations in a temporary transaction. Note that unlike commit of a previously-started transaction, commit with a temporary transaction is non-idempotent. That is, if the CommitRequest is sent to Cloud Spanner more than once (for instance, due to retries in the application, or in the transport library), it is possible that the mutations are executed more than once. If this is undesirable, use BeginTransaction and Commit instead.

.google.spanner.v1.TransactionOptions single_use_transaction = 3;

Returns
Type Description
TransactionOptions

The singleUseTransaction.

getSingleUseTransactionBuilder()

public TransactionOptions.Builder getSingleUseTransactionBuilder()

Execute mutations in a temporary transaction. Note that unlike commit of a previously-started transaction, commit with a temporary transaction is non-idempotent. That is, if the CommitRequest is sent to Cloud Spanner more than once (for instance, due to retries in the application, or in the transport library), it is possible that the mutations are executed more than once. If this is undesirable, use BeginTransaction and Commit instead.

.google.spanner.v1.TransactionOptions single_use_transaction = 3;

Returns
Type Description
TransactionOptions.Builder

getSingleUseTransactionOrBuilder()

public TransactionOptionsOrBuilder getSingleUseTransactionOrBuilder()

Execute mutations in a temporary transaction. Note that unlike commit of a previously-started transaction, commit with a temporary transaction is non-idempotent. That is, if the CommitRequest is sent to Cloud Spanner more than once (for instance, due to retries in the application, or in the transport library), it is possible that the mutations are executed more than once. If this is undesirable, use BeginTransaction and Commit instead.

.google.spanner.v1.TransactionOptions single_use_transaction = 3;

Returns
Type Description
TransactionOptionsOrBuilder

getTransactionCase()

public CommitRequest.TransactionCase getTransactionCase()
Returns
Type Description
CommitRequest.TransactionCase

getTransactionId()

public ByteString getTransactionId()

Commit a previously-started transaction.

bytes transaction_id = 2;

Returns
Type Description
ByteString

The transactionId.

hasMaxCommitDelay()

public boolean hasMaxCommitDelay()

Optional. The amount of latency this request is willing to incur in order to improve throughput. If this field is not set, Spanner assumes requests are relatively latency sensitive and automatically determines an appropriate delay time. You can specify a batching delay value between 0 and 500 ms.

.google.protobuf.Duration max_commit_delay = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the maxCommitDelay field is set.

hasRequestOptions()

public boolean hasRequestOptions()

Common options for this request.

.google.spanner.v1.RequestOptions request_options = 6;

Returns
Type Description
boolean

Whether the requestOptions field is set.

hasSingleUseTransaction()

public boolean hasSingleUseTransaction()

Execute mutations in a temporary transaction. Note that unlike commit of a previously-started transaction, commit with a temporary transaction is non-idempotent. That is, if the CommitRequest is sent to Cloud Spanner more than once (for instance, due to retries in the application, or in the transport library), it is possible that the mutations are executed more than once. If this is undesirable, use BeginTransaction and Commit instead.

.google.spanner.v1.TransactionOptions single_use_transaction = 3;

Returns
Type Description
boolean

Whether the singleUseTransaction field is set.

hasTransactionId()

public boolean hasTransactionId()

Commit a previously-started transaction.

bytes transaction_id = 2;

Returns
Type Description
boolean

Whether the transactionId field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CommitRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CommitRequest.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public CommitRequest.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
CommitRequest.Builder
Overrides

mergeFrom(CommitRequest other)

public CommitRequest.Builder mergeFrom(CommitRequest other)
Parameter
Name Description
other CommitRequest
Returns
Type Description
CommitRequest.Builder

mergeMaxCommitDelay(Duration value)

public CommitRequest.Builder mergeMaxCommitDelay(Duration value)

Optional. The amount of latency this request is willing to incur in order to improve throughput. If this field is not set, Spanner assumes requests are relatively latency sensitive and automatically determines an appropriate delay time. You can specify a batching delay value between 0 and 500 ms.

.google.protobuf.Duration max_commit_delay = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Duration
Returns
Type Description
CommitRequest.Builder

mergeRequestOptions(RequestOptions value)

public CommitRequest.Builder mergeRequestOptions(RequestOptions value)

Common options for this request.

.google.spanner.v1.RequestOptions request_options = 6;

Parameter
Name Description
value RequestOptions
Returns
Type Description
CommitRequest.Builder

mergeSingleUseTransaction(TransactionOptions value)

public CommitRequest.Builder mergeSingleUseTransaction(TransactionOptions value)

Execute mutations in a temporary transaction. Note that unlike commit of a previously-started transaction, commit with a temporary transaction is non-idempotent. That is, if the CommitRequest is sent to Cloud Spanner more than once (for instance, due to retries in the application, or in the transport library), it is possible that the mutations are executed more than once. If this is undesirable, use BeginTransaction and Commit instead.

.google.spanner.v1.TransactionOptions single_use_transaction = 3;

Parameter
Name Description
value TransactionOptions
Returns
Type Description
CommitRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CommitRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CommitRequest.Builder
Overrides

removeMutations(int index)

public CommitRequest.Builder removeMutations(int index)

The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list.

repeated .google.spanner.v1.Mutation mutations = 4;

Parameter
Name Description
index int
Returns
Type Description
CommitRequest.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public CommitRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CommitRequest.Builder
Overrides

setMaxCommitDelay(Duration value)

public CommitRequest.Builder setMaxCommitDelay(Duration value)

Optional. The amount of latency this request is willing to incur in order to improve throughput. If this field is not set, Spanner assumes requests are relatively latency sensitive and automatically determines an appropriate delay time. You can specify a batching delay value between 0 and 500 ms.

.google.protobuf.Duration max_commit_delay = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Duration
Returns
Type Description
CommitRequest.Builder

setMaxCommitDelay(Duration.Builder builderForValue)

public CommitRequest.Builder setMaxCommitDelay(Duration.Builder builderForValue)

Optional. The amount of latency this request is willing to incur in order to improve throughput. If this field is not set, Spanner assumes requests are relatively latency sensitive and automatically determines an appropriate delay time. You can specify a batching delay value between 0 and 500 ms.

.google.protobuf.Duration max_commit_delay = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
CommitRequest.Builder

setMutations(int index, Mutation value)

public CommitRequest.Builder setMutations(int index, Mutation value)

The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list.

repeated .google.spanner.v1.Mutation mutations = 4;

Parameters
Name Description
index int
value Mutation
Returns
Type Description
CommitRequest.Builder

setMutations(int index, Mutation.Builder builderForValue)

public CommitRequest.Builder setMutations(int index, Mutation.Builder builderForValue)

The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list.

repeated .google.spanner.v1.Mutation mutations = 4;

Parameters
Name Description
index int
builderForValue Mutation.Builder
Returns
Type Description
CommitRequest.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public CommitRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
CommitRequest.Builder
Overrides

setRequestOptions(RequestOptions value)

public CommitRequest.Builder setRequestOptions(RequestOptions value)

Common options for this request.

.google.spanner.v1.RequestOptions request_options = 6;

Parameter
Name Description
value RequestOptions
Returns
Type Description
CommitRequest.Builder

setRequestOptions(RequestOptions.Builder builderForValue)

public CommitRequest.Builder setRequestOptions(RequestOptions.Builder builderForValue)

Common options for this request.

.google.spanner.v1.RequestOptions request_options = 6;

Parameter
Name Description
builderForValue RequestOptions.Builder
Returns
Type Description
CommitRequest.Builder

setReturnCommitStats(boolean value)

public CommitRequest.Builder setReturnCommitStats(boolean value)

If true, then statistics related to the transaction will be included in the CommitResponse. Default value is false.

bool return_commit_stats = 5;

Parameter
Name Description
value boolean

The returnCommitStats to set.

Returns
Type Description
CommitRequest.Builder

This builder for chaining.

setSession(String value)

public CommitRequest.Builder setSession(String value)

Required. The session in which the transaction to be committed is running.

string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The session to set.

Returns
Type Description
CommitRequest.Builder

This builder for chaining.

setSessionBytes(ByteString value)

public CommitRequest.Builder setSessionBytes(ByteString value)

Required. The session in which the transaction to be committed is running.

string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for session to set.

Returns
Type Description
CommitRequest.Builder

This builder for chaining.

setSingleUseTransaction(TransactionOptions value)

public CommitRequest.Builder setSingleUseTransaction(TransactionOptions value)

Execute mutations in a temporary transaction. Note that unlike commit of a previously-started transaction, commit with a temporary transaction is non-idempotent. That is, if the CommitRequest is sent to Cloud Spanner more than once (for instance, due to retries in the application, or in the transport library), it is possible that the mutations are executed more than once. If this is undesirable, use BeginTransaction and Commit instead.

.google.spanner.v1.TransactionOptions single_use_transaction = 3;

Parameter
Name Description
value TransactionOptions
Returns
Type Description
CommitRequest.Builder

setSingleUseTransaction(TransactionOptions.Builder builderForValue)

public CommitRequest.Builder setSingleUseTransaction(TransactionOptions.Builder builderForValue)

Execute mutations in a temporary transaction. Note that unlike commit of a previously-started transaction, commit with a temporary transaction is non-idempotent. That is, if the CommitRequest is sent to Cloud Spanner more than once (for instance, due to retries in the application, or in the transport library), it is possible that the mutations are executed more than once. If this is undesirable, use BeginTransaction and Commit instead.

.google.spanner.v1.TransactionOptions single_use_transaction = 3;

Parameter
Name Description
builderForValue TransactionOptions.Builder
Returns
Type Description
CommitRequest.Builder

setTransactionId(ByteString value)

public CommitRequest.Builder setTransactionId(ByteString value)

Commit a previously-started transaction.

bytes transaction_id = 2;

Parameter
Name Description
value ByteString

The transactionId to set.

Returns
Type Description
CommitRequest.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final CommitRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CommitRequest.Builder
Overrides