public final class CommitRequest extends GeneratedMessageV3 implements CommitRequestOrBuilder
The request for Commit.
Protobuf type google.spanner.v1.CommitRequest
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
MAX_COMMIT_DELAY_FIELD_NUMBER
public static final int MAX_COMMIT_DELAY_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
MUTATIONS_FIELD_NUMBER
public static final int MUTATIONS_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
PRECOMMIT_TOKEN_FIELD_NUMBER
public static final int PRECOMMIT_TOKEN_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()
getMaxCommitDelay()
public 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 |
Type |
Description |
Duration |
The maxCommitDelay.
|
getMaxCommitDelayOrBuilder()
public 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];
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
getPrecommitToken()
public MultiplexedSessionPrecommitToken getPrecommitToken()
Optional. If the read-write transaction was executed on a multiplexed
session, the precommit token with the highest sequence number received in
this transaction attempt, should be included here. Failing to do so will
result in a FailedPrecondition error.
This feature is not yet supported and will result in an UNIMPLEMENTED
error.
.google.spanner.v1.MultiplexedSessionPrecommitToken precommit_token = 9 [(.google.api.field_behavior) = OPTIONAL];
getPrecommitTokenOrBuilder()
public MultiplexedSessionPrecommitTokenOrBuilder getPrecommitTokenOrBuilder()
Optional. If the read-write transaction was executed on a multiplexed
session, the precommit token with the highest sequence number received in
this transaction attempt, should be included here. Failing to do so will
result in a FailedPrecondition error.
This feature is not yet supported and will result in an UNIMPLEMENTED
error.
.google.spanner.v1.MultiplexedSessionPrecommitToken precommit_token = 9 [(.google.api.field_behavior) = OPTIONAL];
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.
|
hasMaxCommitDelay()
public 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 |
Type |
Description |
boolean |
Whether the maxCommitDelay field is set.
|
hasPrecommitToken()
public boolean hasPrecommitToken()
Optional. If the read-write transaction was executed on a multiplexed
session, the precommit token with the highest sequence number received in
this transaction attempt, should be included here. Failing to do so will
result in a FailedPrecondition error.
This feature is not yet supported and will result in an UNIMPLEMENTED
error.
.google.spanner.v1.MultiplexedSessionPrecommitToken precommit_token = 9 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
boolean |
Whether the precommitToken field is set.
|
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