Package com.google.spanner.v1
Class CommitRequest
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.spanner.v1.CommitRequest
-
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,CommitRequestOrBuilder,Serializable
public final class CommitRequest extends com.google.protobuf.GeneratedMessageV3 implements CommitRequestOrBuilder
The request for [Commit][google.spanner.v1.Spanner.Commit].
Protobuf typegoogle.spanner.v1.CommitRequest- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCommitRequest.BuilderThe request for [Commit][google.spanner.v1.Spanner.Commit].static classCommitRequest.TransactionCase-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intMUTATIONS_FIELD_NUMBERstatic intREQUEST_OPTIONS_FIELD_NUMBERstatic intRETURN_COMMIT_STATS_FIELD_NUMBERstatic intSESSION_FIELD_NUMBERstatic intSINGLE_USE_TRANSACTION_FIELD_NUMBERstatic intTRANSACTION_ID_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)static CommitRequestgetDefaultInstance()CommitRequestgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()MutationgetMutations(int index)The mutations to be executed when this transaction commits.intgetMutationsCount()The mutations to be executed when this transaction commits.List<Mutation>getMutationsList()The mutations to be executed when this transaction commits.MutationOrBuildergetMutationsOrBuilder(int index)The mutations to be executed when this transaction commits.List<? extends MutationOrBuilder>getMutationsOrBuilderList()The mutations to be executed when this transaction commits.com.google.protobuf.Parser<CommitRequest>getParserForType()RequestOptionsgetRequestOptions()Common options for this request.RequestOptionsOrBuildergetRequestOptionsOrBuilder()Common options for this request.booleangetReturnCommitStats()If `true`, then statistics related to the transaction will be included in the [CommitResponse][google.spanner.v1.CommitResponse.commit_stats].intgetSerializedSize()StringgetSession()Required.com.google.protobuf.ByteStringgetSessionBytes()Required.TransactionOptionsgetSingleUseTransaction()Execute mutations in a temporary transaction.TransactionOptionsOrBuildergetSingleUseTransactionOrBuilder()Execute mutations in a temporary transaction.CommitRequest.TransactionCasegetTransactionCase()com.google.protobuf.ByteStringgetTransactionId()Commit a previously-started transaction.com.google.protobuf.UnknownFieldSetgetUnknownFields()inthashCode()booleanhasRequestOptions()Common options for this request.booleanhasSingleUseTransaction()Execute mutations in a temporary transaction.booleanhasTransactionId()Commit a previously-started transaction.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static CommitRequest.BuildernewBuilder()static CommitRequest.BuildernewBuilder(CommitRequest prototype)CommitRequest.BuildernewBuilderForType()protected CommitRequest.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static CommitRequestparseDelimitedFrom(InputStream input)static CommitRequestparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static CommitRequestparseFrom(byte[] data)static CommitRequestparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static CommitRequestparseFrom(com.google.protobuf.ByteString data)static CommitRequestparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static CommitRequestparseFrom(com.google.protobuf.CodedInputStream input)static CommitRequestparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static CommitRequestparseFrom(InputStream input)static CommitRequestparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static CommitRequestparseFrom(ByteBuffer data)static CommitRequestparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<CommitRequest>parser()CommitRequest.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
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
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
SESSION_FIELD_NUMBER
public static final int SESSION_FIELD_NUMBER
- See Also:
- Constant Field Values
-
TRANSACTION_ID_FIELD_NUMBER
public static final int TRANSACTION_ID_FIELD_NUMBER
- See Also:
- Constant Field Values
-
SINGLE_USE_TRANSACTION_FIELD_NUMBER
public static final int SINGLE_USE_TRANSACTION_FIELD_NUMBER
- See Also:
- Constant Field Values
-
MUTATIONS_FIELD_NUMBER
public static final int MUTATIONS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
RETURN_COMMIT_STATS_FIELD_NUMBER
public static final int RETURN_COMMIT_STATS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
REQUEST_OPTIONS_FIELD_NUMBER
public static final int REQUEST_OPTIONS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getUnknownFields
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
- Specified by:
getUnknownFieldsin interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getTransactionCase
public CommitRequest.TransactionCase getTransactionCase()
- Specified by:
getTransactionCasein interfaceCommitRequestOrBuilder
-
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) = { ... }- Specified by:
getSessionin interfaceCommitRequestOrBuilder- Returns:
- The session.
-
getSessionBytes
public com.google.protobuf.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) = { ... }- Specified by:
getSessionBytesin interfaceCommitRequestOrBuilder- Returns:
- The bytes for session.
-
hasTransactionId
public boolean hasTransactionId()
Commit a previously-started transaction.
bytes transaction_id = 2;- Specified by:
hasTransactionIdin interfaceCommitRequestOrBuilder- Returns:
- Whether the transactionId field is set.
-
getTransactionId
public com.google.protobuf.ByteString getTransactionId()
Commit a previously-started transaction.
bytes transaction_id = 2;- Specified by:
getTransactionIdin interfaceCommitRequestOrBuilder- Returns:
- The transactionId.
-
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][google.spanner.v1.Spanner.BeginTransaction] and [Commit][google.spanner.v1.Spanner.Commit] instead.
.google.spanner.v1.TransactionOptions single_use_transaction = 3;- Specified by:
hasSingleUseTransactionin interfaceCommitRequestOrBuilder- Returns:
- Whether the singleUseTransaction field is set.
-
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][google.spanner.v1.Spanner.BeginTransaction] and [Commit][google.spanner.v1.Spanner.Commit] instead.
.google.spanner.v1.TransactionOptions single_use_transaction = 3;- Specified by:
getSingleUseTransactionin interfaceCommitRequestOrBuilder- Returns:
- 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][google.spanner.v1.Spanner.BeginTransaction] and [Commit][google.spanner.v1.Spanner.Commit] instead.
.google.spanner.v1.TransactionOptions single_use_transaction = 3;- Specified by:
getSingleUseTransactionOrBuilderin interfaceCommitRequestOrBuilder
-
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;- Specified by:
getMutationsListin interfaceCommitRequestOrBuilder
-
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;- Specified by:
getMutationsOrBuilderListin interfaceCommitRequestOrBuilder
-
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;- Specified by:
getMutationsCountin interfaceCommitRequestOrBuilder
-
getMutations
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;- Specified by:
getMutationsin interfaceCommitRequestOrBuilder
-
getMutationsOrBuilder
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;- Specified by:
getMutationsOrBuilderin interfaceCommitRequestOrBuilder
-
getReturnCommitStats
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;- Specified by:
getReturnCommitStatsin interfaceCommitRequestOrBuilder- Returns:
- The returnCommitStats.
-
hasRequestOptions
public boolean hasRequestOptions()
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 6;- Specified by:
hasRequestOptionsin interfaceCommitRequestOrBuilder- Returns:
- Whether the requestOptions field is set.
-
getRequestOptions
public RequestOptions getRequestOptions()
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 6;- Specified by:
getRequestOptionsin interfaceCommitRequestOrBuilder- Returns:
- The requestOptions.
-
getRequestOptionsOrBuilder
public RequestOptionsOrBuilder getRequestOptionsOrBuilder()
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 6;- Specified by:
getRequestOptionsOrBuilderin interfaceCommitRequestOrBuilder
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static CommitRequest parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CommitRequest parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CommitRequest parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CommitRequest parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CommitRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CommitRequest parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CommitRequest parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static CommitRequest parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static CommitRequest parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static CommitRequest parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static CommitRequest parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static CommitRequest parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public CommitRequest.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static CommitRequest.Builder newBuilder()
-
newBuilder
public static CommitRequest.Builder newBuilder(CommitRequest prototype)
-
toBuilder
public CommitRequest.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected CommitRequest.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static CommitRequest getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<CommitRequest> parser()
-
getParserForType
public com.google.protobuf.Parser<CommitRequest> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public CommitRequest getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-