Class CommitRequest (6.89.0)

publicfinalclassCommitRequestextendsGeneratedMessageV3implementsCommitRequestOrBuilder

The request for Commit.

Protobuf type google.spanner.v1.CommitRequest

Static Fields

MAX_COMMIT_DELAY_FIELD_NUMBER

publicstaticfinalintMAX_COMMIT_DELAY_FIELD_NUMBER
Field Value
TypeDescription
int

MUTATIONS_FIELD_NUMBER

publicstaticfinalintMUTATIONS_FIELD_NUMBER
Field Value
TypeDescription
int

PRECOMMIT_TOKEN_FIELD_NUMBER

publicstaticfinalintPRECOMMIT_TOKEN_FIELD_NUMBER
Field Value
TypeDescription
int

REQUEST_OPTIONS_FIELD_NUMBER

publicstaticfinalintREQUEST_OPTIONS_FIELD_NUMBER
Field Value
TypeDescription
int

RETURN_COMMIT_STATS_FIELD_NUMBER

publicstaticfinalintRETURN_COMMIT_STATS_FIELD_NUMBER
Field Value
TypeDescription
int

SESSION_FIELD_NUMBER

publicstaticfinalintSESSION_FIELD_NUMBER
Field Value
TypeDescription
int

SINGLE_USE_TRANSACTION_FIELD_NUMBER

publicstaticfinalintSINGLE_USE_TRANSACTION_FIELD_NUMBER
Field Value
TypeDescription
int

TRANSACTION_ID_FIELD_NUMBER

publicstaticfinalintTRANSACTION_ID_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

publicstaticCommitRequestgetDefaultInstance()
Returns
TypeDescription
CommitRequest

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

publicstaticCommitRequest.BuildernewBuilder()
Returns
TypeDescription
CommitRequest.Builder

newBuilder(CommitRequest prototype)

publicstaticCommitRequest.BuildernewBuilder(CommitRequestprototype)
Parameter
NameDescription
prototypeCommitRequest
Returns
TypeDescription
CommitRequest.Builder

parseDelimitedFrom(InputStream input)

publicstaticCommitRequestparseDelimitedFrom(InputStreaminput)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
CommitRequest
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticCommitRequestparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CommitRequest
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

publicstaticCommitRequestparseFrom(byte[]data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
CommitRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticCommitRequestparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CommitRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

publicstaticCommitRequestparseFrom(ByteStringdata)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
CommitRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticCommitRequestparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CommitRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticCommitRequestparseFrom(CodedInputStreaminput)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
CommitRequest
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticCommitRequestparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CommitRequest
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

publicstaticCommitRequestparseFrom(InputStreaminput)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
CommitRequest
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticCommitRequestparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CommitRequest
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

publicstaticCommitRequestparseFrom(ByteBufferdata)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
CommitRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticCommitRequestparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CommitRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

publicstaticParser<CommitRequest>parser()
Returns
TypeDescription
Parser<CommitRequest>

Methods

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

publicCommitRequestgetDefaultInstanceForType()
Returns
TypeDescription
CommitRequest

getMaxCommitDelay()

publicDurationgetMaxCommitDelay()

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
TypeDescription
Duration

The maxCommitDelay.

getMaxCommitDelayOrBuilder()

publicDurationOrBuildergetMaxCommitDelayOrBuilder()

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
TypeDescription
DurationOrBuilder

getMutations(int index)

publicMutationgetMutations(intindex)

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
NameDescription
indexint
Returns
TypeDescription
Mutation

getMutationsCount()

publicintgetMutationsCount()

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
TypeDescription
int

getMutationsList()

publicList<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
TypeDescription
List<Mutation>

getMutationsOrBuilder(int index)

publicMutationOrBuildergetMutationsOrBuilder(intindex)

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
NameDescription
indexint
Returns
TypeDescription
MutationOrBuilder

getMutationsOrBuilderList()

publicList<?extendsMutationOrBuilder>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
TypeDescription
List<? extends com.google.spanner.v1.MutationOrBuilder>

getParserForType()

publicParser<CommitRequest>getParserForType()
Returns
TypeDescription
Parser<CommitRequest>
Overrides

getPrecommitToken()

publicMultiplexedSessionPrecommitTokengetPrecommitToken()

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
TypeDescription
MultiplexedSessionPrecommitToken

The precommitToken.

getPrecommitTokenOrBuilder()

publicMultiplexedSessionPrecommitTokenOrBuildergetPrecommitTokenOrBuilder()

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
TypeDescription
MultiplexedSessionPrecommitTokenOrBuilder

getRequestOptions()

publicRequestOptionsgetRequestOptions()

Common options for this request.

.google.spanner.v1.RequestOptions request_options = 6;

Returns
TypeDescription
RequestOptions

The requestOptions.

getRequestOptionsOrBuilder()

publicRequestOptionsOrBuildergetRequestOptionsOrBuilder()

Common options for this request.

.google.spanner.v1.RequestOptions request_options = 6;

Returns
TypeDescription
RequestOptionsOrBuilder

getReturnCommitStats()

publicbooleangetReturnCommitStats()

If true, then statistics related to the transaction will be included in the CommitResponse. Default value is false.

bool return_commit_stats = 5;

Returns
TypeDescription
boolean

The returnCommitStats.

getSerializedSize()

publicintgetSerializedSize()
Returns
TypeDescription
int
Overrides

getSession()

publicStringgetSession()

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
TypeDescription
String

The session.

getSessionBytes()

publicByteStringgetSessionBytes()

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
TypeDescription
ByteString

The bytes for session.

getSingleUseTransaction()

publicTransactionOptionsgetSingleUseTransaction()

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
TypeDescription
TransactionOptions

The singleUseTransaction.

getSingleUseTransactionOrBuilder()

publicTransactionOptionsOrBuildergetSingleUseTransactionOrBuilder()

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
TypeDescription
TransactionOptionsOrBuilder

getTransactionCase()

publicCommitRequest.TransactionCasegetTransactionCase()
Returns
TypeDescription
CommitRequest.TransactionCase

getTransactionId()

publicByteStringgetTransactionId()

Commit a previously-started transaction.

bytes transaction_id = 2;

Returns
TypeDescription
ByteString

The transactionId.

hasMaxCommitDelay()

publicbooleanhasMaxCommitDelay()

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
TypeDescription
boolean

Whether the maxCommitDelay field is set.

hasPrecommitToken()

publicbooleanhasPrecommitToken()

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
TypeDescription
boolean

Whether the precommitToken field is set.

hasRequestOptions()

publicbooleanhasRequestOptions()

Common options for this request.

.google.spanner.v1.RequestOptions request_options = 6;

Returns
TypeDescription
boolean

Whether the requestOptions field is set.

hasSingleUseTransaction()

publicbooleanhasSingleUseTransaction()

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
TypeDescription
boolean

Whether the singleUseTransaction field is set.

hasTransactionId()

publicbooleanhasTransactionId()

Commit a previously-started transaction.

bytes transaction_id = 2;

Returns
TypeDescription
boolean

Whether the transactionId field is set.

hashCode()

publicinthashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

publicCommitRequest.BuildernewBuilderForType()
Returns
TypeDescription
CommitRequest.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedCommitRequest.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
CommitRequest.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

publicCommitRequest.BuildertoBuilder()
Returns
TypeDescription
CommitRequest.Builder

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException