Class CommitRequest.Builder (6.74.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