public final class CommitRequest extends GeneratedMessageV3 implements CommitRequestOrBuilder
The request for [Commit][google.spanner.v1.Spanner.Commit].Protobuf type
google.spanner.v1.CommitRequest
Modifier and Type | Class and Description |
---|---|
static class |
CommitRequest.Builder
The request for [Commit][google.spanner.v1.Spanner.Commit].
|
static class |
CommitRequest.TransactionCase |
GeneratedMessageV3.BuilderParent, GeneratedMessageV3.ExtendableBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage,BuilderType extends GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageV3.ExtendableMessage<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.FieldAccessorTable, GeneratedMessageV3.UnusedPrivateParameter
AbstractMessageLite.InternalOneOfEnum
Modifier and Type | Field and Description |
---|---|
static int |
MUTATIONS_FIELD_NUMBER |
static int |
REQUEST_OPTIONS_FIELD_NUMBER |
static int |
RETURN_COMMIT_STATS_FIELD_NUMBER |
static int |
SESSION_FIELD_NUMBER |
static int |
SINGLE_USE_TRANSACTION_FIELD_NUMBER |
static int |
TRANSACTION_ID_FIELD_NUMBER |
alwaysUseFieldBuilders, unknownFields
memoizedSize
memoizedHashCode
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
toByteArray, toByteString, writeDelimitedTo, writeTo
public static final int SESSION_FIELD_NUMBER
public static final int TRANSACTION_ID_FIELD_NUMBER
public static final int SINGLE_USE_TRANSACTION_FIELD_NUMBER
public static final int MUTATIONS_FIELD_NUMBER
public static final int RETURN_COMMIT_STATS_FIELD_NUMBER
public static final int REQUEST_OPTIONS_FIELD_NUMBER
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance
in class GeneratedMessageV3
public final UnknownFieldSet getUnknownFields()
getUnknownFields
in interface MessageOrBuilder
getUnknownFields
in class GeneratedMessageV3
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3
public CommitRequest.TransactionCase getTransactionCase()
getTransactionCase
in interface CommitRequestOrBuilder
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) = { ... }
getSession
in interface CommitRequestOrBuilder
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) = { ... }
getSessionBytes
in interface CommitRequestOrBuilder
public boolean hasTransactionId()
Commit a previously-started transaction.
bytes transaction_id = 2;
hasTransactionId
in interface CommitRequestOrBuilder
public ByteString getTransactionId()
Commit a previously-started transaction.
bytes transaction_id = 2;
getTransactionId
in interface CommitRequestOrBuilder
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][google.spanner.v1.Spanner.BeginTransaction] and [Commit][google.spanner.v1.Spanner.Commit] instead.
.google.spanner.v1.TransactionOptions single_use_transaction = 3;
hasSingleUseTransaction
in interface CommitRequestOrBuilder
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][google.spanner.v1.Spanner.BeginTransaction] and [Commit][google.spanner.v1.Spanner.Commit] instead.
.google.spanner.v1.TransactionOptions single_use_transaction = 3;
getSingleUseTransaction
in interface CommitRequestOrBuilder
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][google.spanner.v1.Spanner.BeginTransaction] and [Commit][google.spanner.v1.Spanner.Commit] instead.
.google.spanner.v1.TransactionOptions single_use_transaction = 3;
getSingleUseTransactionOrBuilder
in interface CommitRequestOrBuilder
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;
getMutationsList
in interface CommitRequestOrBuilder
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;
getMutationsOrBuilderList
in interface CommitRequestOrBuilder
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;
getMutationsCount
in interface CommitRequestOrBuilder
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;
getMutations
in interface CommitRequestOrBuilder
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;
getMutationsOrBuilder
in interface CommitRequestOrBuilder
public boolean getReturnCommitStats()
If `true`, then statistics related to the transaction will be included in the [CommitResponse][google.spanner.v1.CommitResponse.commit_stats]. Default value is `false`.
bool return_commit_stats = 5;
getReturnCommitStats
in interface CommitRequestOrBuilder
public boolean hasRequestOptions()
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 6;
hasRequestOptions
in interface CommitRequestOrBuilder
public RequestOptions getRequestOptions()
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 6;
getRequestOptions
in interface CommitRequestOrBuilder
public RequestOptionsOrBuilder getRequestOptionsOrBuilder()
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 6;
getRequestOptionsOrBuilder
in interface CommitRequestOrBuilder
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3
public void writeTo(CodedOutputStream output) throws IOException
writeTo
in interface MessageLite
writeTo
in class GeneratedMessageV3
IOException
public int getSerializedSize()
getSerializedSize
in interface MessageLite
getSerializedSize
in class GeneratedMessageV3
public boolean equals(Object obj)
equals
in interface Message
equals
in class AbstractMessage
public int hashCode()
hashCode
in interface Message
hashCode
in class AbstractMessage
public static CommitRequest parseFrom(ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static CommitRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static CommitRequest parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static CommitRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static CommitRequest parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static CommitRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static CommitRequest parseFrom(InputStream input) throws IOException
IOException
public static CommitRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static CommitRequest parseDelimitedFrom(InputStream input) throws IOException
IOException
public static CommitRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static CommitRequest parseFrom(CodedInputStream input) throws IOException
IOException
public static CommitRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public CommitRequest.Builder newBuilderForType()
newBuilderForType
in interface Message
newBuilderForType
in interface MessageLite
public static CommitRequest.Builder newBuilder()
public static CommitRequest.Builder newBuilder(CommitRequest prototype)
public CommitRequest.Builder toBuilder()
toBuilder
in interface Message
toBuilder
in interface MessageLite
protected CommitRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
newBuilderForType
in class GeneratedMessageV3
public static CommitRequest getDefaultInstance()
public static Parser<CommitRequest> parser()
public Parser<CommitRequest> getParserForType()
getParserForType
in interface Message
getParserForType
in interface MessageLite
getParserForType
in class GeneratedMessageV3
public CommitRequest getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
Copyright © 2022 Google LLC. All rights reserved.