Class CommitRequest (6.53.0)

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

REQUEST_OPTIONS_FIELD_NUMBER

public static final int REQUEST_OPTIONS_FIELD_NUMBER
Field Value
TypeDescription
int

RETURN_COMMIT_STATS_FIELD_NUMBER

public static final int RETURN_COMMIT_STATS_FIELD_NUMBER
Field Value
TypeDescription
int

SESSION_FIELD_NUMBER

public static final int SESSION_FIELD_NUMBER
Field Value
TypeDescription
int

SINGLE_USE_TRANSACTION_FIELD_NUMBER

public static final int SINGLE_USE_TRANSACTION_FIELD_NUMBER
Field Value
TypeDescription
int

TRANSACTION_ID_FIELD_NUMBER

public static final int TRANSACTION_ID_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static CommitRequest getDefaultInstance()
Returns
TypeDescription
CommitRequest

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static CommitRequest.Builder newBuilder()
Returns
TypeDescription
CommitRequest.Builder

newBuilder(CommitRequest prototype)

public static CommitRequest.Builder newBuilder(CommitRequest prototype)
Parameter
NameDescription
prototypeCommitRequest
Returns
TypeDescription
CommitRequest.Builder

parseDelimitedFrom(InputStream input)

public static CommitRequest parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
CommitRequest
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CommitRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CommitRequest
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static CommitRequest parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
CommitRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static CommitRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CommitRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static CommitRequest parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
CommitRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static CommitRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CommitRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static CommitRequest parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
CommitRequest
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static CommitRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CommitRequest
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static CommitRequest parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
CommitRequest
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CommitRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CommitRequest
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static CommitRequest parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
CommitRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static CommitRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CommitRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<CommitRequest> parser()
Returns
TypeDescription
Parser<CommitRequest>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public CommitRequest getDefaultInstanceForType()
Returns
TypeDescription
CommitRequest

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

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

Returns
TypeDescription
List<Mutation>

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

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

getParserForType()

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

getRequestOptions()

public RequestOptions getRequestOptions()

Common options for this request.

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

Returns
TypeDescription
RequestOptions

The requestOptions.

getRequestOptionsOrBuilder()

public RequestOptionsOrBuilder getRequestOptionsOrBuilder()

Common options for this request.

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

Returns
TypeDescription
RequestOptionsOrBuilder

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

The returnCommitStats.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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;

Returns
TypeDescription
TransactionOptions

The singleUseTransaction.

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

getTransactionCase()

public CommitRequest.TransactionCase getTransactionCase()
Returns
TypeDescription
CommitRequest.TransactionCase

getTransactionId()

public ByteString getTransactionId()

Commit a previously-started transaction.

bytes transaction_id = 2;

Returns
TypeDescription
ByteString

The transactionId.

hasRequestOptions()

public boolean hasRequestOptions()

Common options for this request.

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

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

Whether the singleUseTransaction field is set.

hasTransactionId()

public boolean hasTransactionId()

Commit a previously-started transaction.

bytes transaction_id = 2;

Returns
TypeDescription
boolean

Whether the transactionId field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public CommitRequest.Builder newBuilderForType()
Returns
TypeDescription
CommitRequest.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected CommitRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
CommitRequest.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public CommitRequest.Builder toBuilder()
Returns
TypeDescription
CommitRequest.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException