public final class CommitRequest extends GeneratedMessageV3 implements CommitRequestOrBuilder
The request for Commit.
Protobuf type google.spanner.v1.CommitRequest
Fields
MUTATIONS_FIELD_NUMBER
public static final int MUTATIONS_FIELD_NUMBER
Field Value
REQUEST_OPTIONS_FIELD_NUMBER
public static final int REQUEST_OPTIONS_FIELD_NUMBER
Field Value
RETURN_COMMIT_STATS_FIELD_NUMBER
public static final int RETURN_COMMIT_STATS_FIELD_NUMBER
Field Value
SESSION_FIELD_NUMBER
public static final int SESSION_FIELD_NUMBER
Field Value
SINGLE_USE_TRANSACTION_FIELD_NUMBER
public static final int SINGLE_USE_TRANSACTION_FIELD_NUMBER
Field Value
TRANSACTION_ID_FIELD_NUMBER
public static final int TRANSACTION_ID_FIELD_NUMBER
Field Value
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getDefaultInstance()
public static CommitRequest getDefaultInstance()
Returns
getDefaultInstanceForType()
public CommitRequest getDefaultInstanceForType()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
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
Returns
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
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
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
Returns
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()
Returns
Overrides
getRequestOptions()
public RequestOptions getRequestOptions()
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 6;
Returns
getRequestOptionsOrBuilder()
public RequestOptionsOrBuilder getRequestOptionsOrBuilder()
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 6;
Returns
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
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
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
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
getTransactionCase()
public CommitRequest.TransactionCase getTransactionCase()
Returns
getTransactionId()
public ByteString getTransactionId()
Commit a previously-started transaction.
bytes transaction_id = 2;
Returns
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
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
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilder()
public static CommitRequest.Builder newBuilder()
Returns
newBuilder(CommitRequest prototype)
public static CommitRequest.Builder newBuilder(CommitRequest prototype)
Parameter
Returns
newBuilderForType()
public CommitRequest.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected CommitRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
public static CommitRequest parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static CommitRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static CommitRequest parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static CommitRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static CommitRequest parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static CommitRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static CommitRequest parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static CommitRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static CommitRequest parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static CommitRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static CommitRequest parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static CommitRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<CommitRequest> parser()
Returns
toBuilder()
public CommitRequest.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions