Some or all of the information on this page might not apply to Trusted Cloud by S3NS.
Class CommitRequest (6.25.1)
Note: Some or all of the information on this page might not apply
to Trusted Cloud. For a list of services that are available in
Trusted Cloud, see Services available for
Trusted Cloud .
Version 6.25.1keyboard_arrow_down
public final class CommitRequest extends GeneratedMessageV3 implements CommitRequestOrBuilder
The request for Commit .
Protobuf type google.spanner.v1.CommitRequest
Static Fields
MUTATIONS_FIELD_NUMBER
public static final int MUTATIONS_FIELD_NUMBER
Field Value
Type
Description
int
REQUEST_OPTIONS_FIELD_NUMBER
public static final int REQUEST_OPTIONS_FIELD_NUMBER
Field Value
Type
Description
int
RETURN_COMMIT_STATS_FIELD_NUMBER
public static final int RETURN_COMMIT_STATS_FIELD_NUMBER
Field Value
Type
Description
int
SESSION_FIELD_NUMBER
public static final int SESSION_FIELD_NUMBER
Field Value
Type
Description
int
SINGLE_USE_TRANSACTION_FIELD_NUMBER
public static final int SINGLE_USE_TRANSACTION_FIELD_NUMBER
Field Value
Type
Description
int
TRANSACTION_ID_FIELD_NUMBER
public static final int TRANSACTION_ID_FIELD_NUMBER
Field Value
Type
Description
int
Static Methods
getDefaultInstance()
public static CommitRequest getDefaultInstance ()
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
newBuilder()
public static CommitRequest . Builder newBuilder ()
newBuilder(CommitRequest prototype)
public static CommitRequest . Builder newBuilder ( CommitRequest prototype )
public static CommitRequest parseDelimitedFrom ( InputStream input )
public static CommitRequest parseDelimitedFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
parseFrom(byte[] data)
public static CommitRequest parseFrom ( byte [] data )
Parameter
Name
Description
data
byte []
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static CommitRequest parseFrom ( byte [] data , ExtensionRegistryLite extensionRegistry )
parseFrom(ByteString data)
public static CommitRequest parseFrom ( ByteString data )
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static CommitRequest parseFrom ( ByteString data , ExtensionRegistryLite extensionRegistry )
public static CommitRequest parseFrom ( CodedInputStream input )
public static CommitRequest parseFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
public static CommitRequest parseFrom ( InputStream input )
public static CommitRequest parseFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
parseFrom(ByteBuffer data)
public static CommitRequest parseFrom ( ByteBuffer data )
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static CommitRequest parseFrom ( ByteBuffer data , ExtensionRegistryLite extensionRegistry )
parser()
public static Parser<CommitRequest> parser ()
Methods
equals(Object obj)
public boolean equals ( Object obj )
Parameter
Name
Description
obj
Object
Overrides
getDefaultInstanceForType()
public CommitRequest getDefaultInstanceForType ()
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
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;
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
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 >
getParserForType()
public Parser<CommitRequest> getParserForType ()
Overrides
getRequestOptions()
public RequestOptions getRequestOptions ()
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 6;
getRequestOptionsOrBuilder()
public RequestOptionsOrBuilder getRequestOptionsOrBuilder ()
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 6;
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.
getSerializedSize()
public int getSerializedSize ()
Returns
Type
Description
int
Overrides
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;
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;
getTransactionCase()
public CommitRequest . TransactionCase getTransactionCase ()
getTransactionId()
public ByteString getTransactionId ()
Commit a previously-started transaction.
bytes transaction_id = 2;
Returns
Type
Description
ByteString
The transactionId.
getUnknownFields()
public final UnknownFieldSet getUnknownFields ()
Overrides
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.
hashCode()
Returns
Type
Description
int
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Overrides
isInitialized()
public final boolean isInitialized ()
Overrides
newBuilderForType()
public CommitRequest . Builder newBuilderForType ()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected CommitRequest . Builder newBuilderForType ( GeneratedMessageV3 . BuilderParent parent )
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance ( GeneratedMessageV3 . UnusedPrivateParameter unused )
Returns
Type
Description
Object
Overrides
toBuilder()
public CommitRequest . Builder toBuilder ()
writeTo(CodedOutputStream output)
public void writeTo ( CodedOutputStream output )
Overrides
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-18 UTC."],[],[]]