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 type
google.spanner.v1.CommitRequest- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe request for [Commit][google.spanner.v1.Spanner.Commit].static enumNested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessageV3
alwaysUseFieldBuilders, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic CommitRequeststatic final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.DurationOptional.com.google.protobuf.DurationOrBuilderOptional.getMutations(int index) The mutations to be executed when this transaction commits.intThe mutations to be executed when this transaction commits.The mutations to be executed when this transaction commits.getMutationsOrBuilder(int index) The mutations to be executed when this transaction commits.List<? extends MutationOrBuilder>The mutations to be executed when this transaction commits.com.google.protobuf.Parser<CommitRequest>Common options for this request.Common options for this request.booleanIf `true`, then statistics related to the transaction will be included in the [CommitResponse][google.spanner.v1.CommitResponse.commit_stats].intRequired.com.google.protobuf.ByteStringRequired.Execute mutations in a temporary transaction.Execute mutations in a temporary transaction.com.google.protobuf.ByteStringCommit a previously-started transaction.inthashCode()booleanOptional.booleanCommon options for this request.booleanExecute mutations in a temporary transaction.booleanCommit a previously-started transaction.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanstatic CommitRequest.Builderstatic CommitRequest.BuildernewBuilder(CommitRequest prototype) 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()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, 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, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
SESSION_FIELD_NUMBER
public static final int SESSION_FIELD_NUMBER- See Also:
-
TRANSACTION_ID_FIELD_NUMBER
public static final int TRANSACTION_ID_FIELD_NUMBER- See Also:
-
SINGLE_USE_TRANSACTION_FIELD_NUMBER
public static final int SINGLE_USE_TRANSACTION_FIELD_NUMBER- See Also:
-
MUTATIONS_FIELD_NUMBER
public static final int MUTATIONS_FIELD_NUMBER- See Also:
-
RETURN_COMMIT_STATS_FIELD_NUMBER
public static final int RETURN_COMMIT_STATS_FIELD_NUMBER- See Also:
-
MAX_COMMIT_DELAY_FIELD_NUMBER
public static final int MAX_COMMIT_DELAY_FIELD_NUMBER- See Also:
-
REQUEST_OPTIONS_FIELD_NUMBER
public static final int REQUEST_OPTIONS_FIELD_NUMBER- See Also:
-
-
Method Details
-
newInstance
- Overrides:
newInstancein 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
- Specified by:
getTransactionCasein interfaceCommitRequestOrBuilder
-
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
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
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
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
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
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
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.
-
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];- Specified by:
hasMaxCommitDelayin interfaceCommitRequestOrBuilder- Returns:
- Whether the maxCommitDelay field is set.
-
getMaxCommitDelay
public com.google.protobuf.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];- Specified by:
getMaxCommitDelayin interfaceCommitRequestOrBuilder- Returns:
- The maxCommitDelay.
-
getMaxCommitDelayOrBuilder
public com.google.protobuf.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];- Specified by:
getMaxCommitDelayOrBuilderin interfaceCommitRequestOrBuilder
-
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
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 6;- Specified by:
getRequestOptionsin interfaceCommitRequestOrBuilder- Returns:
- The requestOptions.
-
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
- 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
- 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
- Throws:
IOException
-
parseFrom
public static CommitRequest parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- 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
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
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
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-