public static final class CommitRequest.Builder extends GeneratedMessageV3.Builder<CommitRequest.Builder> implements CommitRequestOrBuilder
The request for Commit.
Protobuf type google.spanner.v1.CommitRequest
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > CommitRequest.BuilderImplements
CommitRequestOrBuilderMethods
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;
Name | Description |
values | Iterable<? extends com.google.spanner.v1.Mutation> |
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;
Name | Description |
value | Mutation |
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;
Name | Description |
builderForValue | Mutation.Builder |
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;
Name | Description |
index | int |
value | Mutation |
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;
Name | Description |
index | int |
builderForValue | Mutation.Builder |
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;
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;
Name | Description |
index | int |
Type | Description |
Mutation.Builder |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public CommitRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
CommitRequest.Builder |
build()
public CommitRequest build()
Type | Description |
CommitRequest |
buildPartial()
public CommitRequest buildPartial()
Type | Description |
CommitRequest |
clear()
public CommitRequest.Builder clear()
Type | Description |
CommitRequest.Builder |
clearField(Descriptors.FieldDescriptor field)
public CommitRequest.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field | FieldDescriptor |
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;
Type | Description |
CommitRequest.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
public CommitRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof | OneofDescriptor |
Type | Description |
CommitRequest.Builder |
clearRequestOptions()
public CommitRequest.Builder clearRequestOptions()
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 6;
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;
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) = { ... }
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;
Type | Description |
CommitRequest.Builder |
clearTransaction()
public CommitRequest.Builder clearTransaction()
Type | Description |
CommitRequest.Builder |
clearTransactionId()
public CommitRequest.Builder clearTransactionId()
Commit a previously-started transaction.
bytes transaction_id = 2;
Type | Description |
CommitRequest.Builder | This builder for chaining. |
clone()
public CommitRequest.Builder clone()
Type | Description |
CommitRequest.Builder |
getDefaultInstanceForType()
public CommitRequest getDefaultInstanceForType()
Type | Description |
CommitRequest |
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Type | Description |
Descriptor |
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;
Name | Description |
index | int |
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;
Name | Description |
index | int |
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;
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;
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;
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;
Name | Description |
index | int |
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;
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;
Type | Description |
RequestOptions | The requestOptions. |
getRequestOptionsBuilder()
public RequestOptions.Builder getRequestOptionsBuilder()
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 6;
Type | Description |
RequestOptions.Builder |
getRequestOptionsOrBuilder()
public RequestOptionsOrBuilder getRequestOptionsOrBuilder()
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 6;
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;
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) = { ... }
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) = { ... }
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;
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;
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;
Type | Description |
TransactionOptionsOrBuilder |
getTransactionCase()
public CommitRequest.TransactionCase getTransactionCase()
Type | Description |
CommitRequest.TransactionCase |
getTransactionId()
public ByteString getTransactionId()
Commit a previously-started transaction.
bytes transaction_id = 2;
Type | Description |
ByteString | The transactionId. |
hasRequestOptions()
public boolean hasRequestOptions()
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 6;
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;
Type | Description |
boolean | Whether the singleUseTransaction field is set. |
hasTransactionId()
public boolean hasTransactionId()
Commit a previously-started transaction.
bytes transaction_id = 2;
Type | Description |
boolean | Whether the transactionId field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public CommitRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
CommitRequest.Builder |
Type | Description |
IOException |
mergeFrom(Message other)
public CommitRequest.Builder mergeFrom(Message other)
Name | Description |
other | Message |
Type | Description |
CommitRequest.Builder |
mergeFrom(CommitRequest other)
public CommitRequest.Builder mergeFrom(CommitRequest other)
Name | Description |
other | CommitRequest |
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;
Name | Description |
value | RequestOptions |
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;
Name | Description |
value | TransactionOptions |
Type | Description |
CommitRequest.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final CommitRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
CommitRequest.Builder |
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;
Name | Description |
index | int |
Type | Description |
CommitRequest.Builder |
setField(Descriptors.FieldDescriptor field, Object value)
public CommitRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
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;
Name | Description |
index | int |
value | Mutation |
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;
Name | Description |
index | int |
builderForValue | Mutation.Builder |
Type | Description |
CommitRequest.Builder |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public CommitRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Type | Description |
CommitRequest.Builder |
setRequestOptions(RequestOptions value)
public CommitRequest.Builder setRequestOptions(RequestOptions value)
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 6;
Name | Description |
value | RequestOptions |
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;
Name | Description |
builderForValue | RequestOptions.Builder |
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;
Name | Description |
value | boolean The returnCommitStats to set. |
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) = { ... }
Name | Description |
value | String The session to set. |
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) = { ... }
Name | Description |
value | ByteString The bytes for session to set. |
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;
Name | Description |
value | TransactionOptions |
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;
Name | Description |
builderForValue | TransactionOptions.Builder |
Type | Description |
CommitRequest.Builder |
setTransactionId(ByteString value)
public CommitRequest.Builder setTransactionId(ByteString value)
Commit a previously-started transaction.
bytes transaction_id = 2;
Name | Description |
value | ByteString The transactionId to set. |
Type | Description |
CommitRequest.Builder | This builder for chaining. |
setUnknownFields(UnknownFieldSet unknownFields)
public final CommitRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
CommitRequest.Builder |