Package com.google.spanner.v1
Interface CommitRequestOrBuilder
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
CommitRequest,CommitRequest.Builder
public interface CommitRequestOrBuilder
extends com.google.protobuf.MessageOrBuilder
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.protobuf.DurationOptional.com.google.protobuf.DurationOrBuilderOptional.getMutations(int index) The mutations to be executed when this transaction commits.intThe mutations to be executed when this transaction commits.The mutations to be executed when this transaction commits.getMutationsOrBuilder(int index) The mutations to be executed when this transaction commits.List<? extends MutationOrBuilder>The mutations to be executed when this transaction commits.Common options for this request.Common options for this request.booleanIf `true`, then statistics related to the transaction will be included in the [CommitResponse][google.spanner.v1.CommitResponse.commit_stats].Required.com.google.protobuf.ByteStringRequired.Execute mutations in a temporary transaction.Execute mutations in a temporary transaction.com.google.protobuf.ByteStringCommit a previously-started transaction.booleanOptional.booleanCommon options for this request.booleanExecute mutations in a temporary transaction.booleanCommit a previously-started transaction.Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
isInitializedMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getSession
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:
- The session.
-
getSessionBytes
com.google.protobuf.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:
- The bytes for session.
-
hasTransactionId
boolean hasTransactionId()Commit a previously-started transaction.
bytes transaction_id = 2;- Returns:
- Whether the transactionId field is set.
-
getTransactionId
com.google.protobuf.ByteString getTransactionId()Commit a previously-started transaction.
bytes transaction_id = 2;- Returns:
- The transactionId.
-
hasSingleUseTransaction
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][google.spanner.v1.Spanner.BeginTransaction] and [Commit][google.spanner.v1.Spanner.Commit] instead.
.google.spanner.v1.TransactionOptions single_use_transaction = 3;- Returns:
- Whether the singleUseTransaction field is set.
-
getSingleUseTransaction
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][google.spanner.v1.Spanner.BeginTransaction] and [Commit][google.spanner.v1.Spanner.Commit] instead.
.google.spanner.v1.TransactionOptions single_use_transaction = 3;- Returns:
- The singleUseTransaction.
-
getSingleUseTransactionOrBuilder
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][google.spanner.v1.Spanner.BeginTransaction] and [Commit][google.spanner.v1.Spanner.Commit] instead.
.google.spanner.v1.TransactionOptions single_use_transaction = 3; -
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; -
getMutations
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; -
getMutationsCount
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; -
getMutationsOrBuilderList
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; -
getMutationsOrBuilder
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; -
getReturnCommitStats
boolean getReturnCommitStats()If `true`, then statistics related to the transaction will be included in the [CommitResponse][google.spanner.v1.CommitResponse.commit_stats]. Default value is `false`.
bool return_commit_stats = 5;- Returns:
- The returnCommitStats.
-
hasMaxCommitDelay
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:
- Whether the maxCommitDelay field is set.
-
getMaxCommitDelay
com.google.protobuf.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:
- The maxCommitDelay.
-
getMaxCommitDelayOrBuilder
com.google.protobuf.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]; -
hasRequestOptions
boolean hasRequestOptions()Common options for this request.
.google.spanner.v1.RequestOptions request_options = 6;- Returns:
- Whether the requestOptions field is set.
-
getRequestOptions
RequestOptions getRequestOptions()Common options for this request.
.google.spanner.v1.RequestOptions request_options = 6;- Returns:
- The requestOptions.
-
getRequestOptionsOrBuilder
RequestOptionsOrBuilder getRequestOptionsOrBuilder()Common options for this request.
.google.spanner.v1.RequestOptions request_options = 6; -
getTransactionCase
CommitRequest.TransactionCase getTransactionCase()
-