Package com.google.spanner.v1
Class Transaction.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Transaction.Builder>
com.google.spanner.v1.Transaction.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,TransactionOrBuilder,Cloneable
- Enclosing class:
- Transaction
public static final class Transaction.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Transaction.Builder>
implements TransactionOrBuilder
A transaction.Protobuf type
google.spanner.v1.Transaction-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Optional.clearId()`id` may be used to identify the transaction in subsequent [Read][google.spanner.v1.Spanner.Read], [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], [Commit][google.spanner.v1.Spanner.Commit], or [Rollback][google.spanner.v1.Spanner.Rollback] calls.A precommit token is included in the response of a BeginTransaction request if the read-write transaction is on a multiplexed session and a mutation_key was specified in the [BeginTransaction][google.spanner.v1.BeginTransactionRequest].For snapshot read-only transactions, the read timestamp chosen for the transaction.Optional.Optional.Optional.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.Descriptorcom.google.protobuf.ByteStringgetId()`id` may be used to identify the transaction in subsequent [Read][google.spanner.v1.Spanner.Read], [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], [Commit][google.spanner.v1.Spanner.Commit], or [Rollback][google.spanner.v1.Spanner.Rollback] calls.A precommit token is included in the response of a BeginTransaction request if the read-write transaction is on a multiplexed session and a mutation_key was specified in the [BeginTransaction][google.spanner.v1.BeginTransactionRequest].A precommit token is included in the response of a BeginTransaction request if the read-write transaction is on a multiplexed session and a mutation_key was specified in the [BeginTransaction][google.spanner.v1.BeginTransactionRequest].A precommit token is included in the response of a BeginTransaction request if the read-write transaction is on a multiplexed session and a mutation_key was specified in the [BeginTransaction][google.spanner.v1.BeginTransactionRequest].com.google.protobuf.TimestampFor snapshot read-only transactions, the read timestamp chosen for the transaction.com.google.protobuf.Timestamp.BuilderFor snapshot read-only transactions, the read timestamp chosen for the transaction.com.google.protobuf.TimestampOrBuilderFor snapshot read-only transactions, the read timestamp chosen for the transaction.booleanOptional.booleanA precommit token is included in the response of a BeginTransaction request if the read-write transaction is on a multiplexed session and a mutation_key was specified in the [BeginTransaction][google.spanner.v1.BeginTransactionRequest].booleanFor snapshot read-only transactions, the read timestamp chosen for the transaction.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeCacheUpdate(CacheUpdate value) Optional.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(Transaction other) A precommit token is included in the response of a BeginTransaction request if the read-write transaction is on a multiplexed session and a mutation_key was specified in the [BeginTransaction][google.spanner.v1.BeginTransactionRequest].mergeReadTimestamp(com.google.protobuf.Timestamp value) For snapshot read-only transactions, the read timestamp chosen for the transaction.setCacheUpdate(CacheUpdate value) Optional.setCacheUpdate(CacheUpdate.Builder builderForValue) Optional.setId(com.google.protobuf.ByteString value) `id` may be used to identify the transaction in subsequent [Read][google.spanner.v1.Spanner.Read], [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], [Commit][google.spanner.v1.Spanner.Commit], or [Rollback][google.spanner.v1.Spanner.Rollback] calls.A precommit token is included in the response of a BeginTransaction request if the read-write transaction is on a multiplexed session and a mutation_key was specified in the [BeginTransaction][google.spanner.v1.BeginTransactionRequest].setPrecommitToken(MultiplexedSessionPrecommitToken.Builder builderForValue) A precommit token is included in the response of a BeginTransaction request if the read-write transaction is on a multiplexed session and a mutation_key was specified in the [BeginTransaction][google.spanner.v1.BeginTransactionRequest].setReadTimestamp(com.google.protobuf.Timestamp value) For snapshot read-only transactions, the read timestamp chosen for the transaction.setReadTimestamp(com.google.protobuf.Timestamp.Builder builderForValue) For snapshot read-only transactions, the read timestamp chosen for the transaction.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<Transaction.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<Transaction.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<Transaction.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Transaction.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Transaction.Builder>
-
mergeFrom
public Transaction.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Transaction.Builder>- Throws:
IOException
-
getId
public com.google.protobuf.ByteString getId()`id` may be used to identify the transaction in subsequent [Read][google.spanner.v1.Spanner.Read], [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], [Commit][google.spanner.v1.Spanner.Commit], or [Rollback][google.spanner.v1.Spanner.Rollback] calls. Single-use read-only transactions do not have IDs, because single-use transactions do not support multiple requests.
bytes id = 1;- Specified by:
getIdin interfaceTransactionOrBuilder- Returns:
- The id.
-
setId
`id` may be used to identify the transaction in subsequent [Read][google.spanner.v1.Spanner.Read], [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], [Commit][google.spanner.v1.Spanner.Commit], or [Rollback][google.spanner.v1.Spanner.Rollback] calls. Single-use read-only transactions do not have IDs, because single-use transactions do not support multiple requests.
bytes id = 1;- Parameters:
value- The id to set.- Returns:
- This builder for chaining.
-
clearId
`id` may be used to identify the transaction in subsequent [Read][google.spanner.v1.Spanner.Read], [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], [Commit][google.spanner.v1.Spanner.Commit], or [Rollback][google.spanner.v1.Spanner.Rollback] calls. Single-use read-only transactions do not have IDs, because single-use transactions do not support multiple requests.
bytes id = 1;- Returns:
- This builder for chaining.
-
hasReadTimestamp
public boolean hasReadTimestamp()For snapshot read-only transactions, the read timestamp chosen for the transaction. Not returned by default: see [TransactionOptions.ReadOnly.return_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.return_read_timestamp]. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example: `"2014-10-02T15:01:23.045123456Z"`.
.google.protobuf.Timestamp read_timestamp = 2;- Specified by:
hasReadTimestampin interfaceTransactionOrBuilder- Returns:
- Whether the readTimestamp field is set.
-
getReadTimestamp
public com.google.protobuf.Timestamp getReadTimestamp()For snapshot read-only transactions, the read timestamp chosen for the transaction. Not returned by default: see [TransactionOptions.ReadOnly.return_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.return_read_timestamp]. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example: `"2014-10-02T15:01:23.045123456Z"`.
.google.protobuf.Timestamp read_timestamp = 2;- Specified by:
getReadTimestampin interfaceTransactionOrBuilder- Returns:
- The readTimestamp.
-
setReadTimestamp
For snapshot read-only transactions, the read timestamp chosen for the transaction. Not returned by default: see [TransactionOptions.ReadOnly.return_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.return_read_timestamp]. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example: `"2014-10-02T15:01:23.045123456Z"`.
.google.protobuf.Timestamp read_timestamp = 2; -
setReadTimestamp
For snapshot read-only transactions, the read timestamp chosen for the transaction. Not returned by default: see [TransactionOptions.ReadOnly.return_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.return_read_timestamp]. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example: `"2014-10-02T15:01:23.045123456Z"`.
.google.protobuf.Timestamp read_timestamp = 2; -
mergeReadTimestamp
For snapshot read-only transactions, the read timestamp chosen for the transaction. Not returned by default: see [TransactionOptions.ReadOnly.return_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.return_read_timestamp]. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example: `"2014-10-02T15:01:23.045123456Z"`.
.google.protobuf.Timestamp read_timestamp = 2; -
clearReadTimestamp
For snapshot read-only transactions, the read timestamp chosen for the transaction. Not returned by default: see [TransactionOptions.ReadOnly.return_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.return_read_timestamp]. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example: `"2014-10-02T15:01:23.045123456Z"`.
.google.protobuf.Timestamp read_timestamp = 2; -
getReadTimestampBuilder
public com.google.protobuf.Timestamp.Builder getReadTimestampBuilder()For snapshot read-only transactions, the read timestamp chosen for the transaction. Not returned by default: see [TransactionOptions.ReadOnly.return_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.return_read_timestamp]. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example: `"2014-10-02T15:01:23.045123456Z"`.
.google.protobuf.Timestamp read_timestamp = 2; -
getReadTimestampOrBuilder
public com.google.protobuf.TimestampOrBuilder getReadTimestampOrBuilder()For snapshot read-only transactions, the read timestamp chosen for the transaction. Not returned by default: see [TransactionOptions.ReadOnly.return_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.return_read_timestamp]. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example: `"2014-10-02T15:01:23.045123456Z"`.
.google.protobuf.Timestamp read_timestamp = 2;- Specified by:
getReadTimestampOrBuilderin interfaceTransactionOrBuilder
-
hasPrecommitToken
public boolean hasPrecommitToken()A precommit token is included in the response of a BeginTransaction request if the read-write transaction is on a multiplexed session and a mutation_key was specified in the [BeginTransaction][google.spanner.v1.BeginTransactionRequest]. The precommit token with the highest sequence number from this transaction attempt should be passed to the [Commit][google.spanner.v1.Spanner.Commit] request for this transaction.
.google.spanner.v1.MultiplexedSessionPrecommitToken precommit_token = 3;- Specified by:
hasPrecommitTokenin interfaceTransactionOrBuilder- Returns:
- Whether the precommitToken field is set.
-
getPrecommitToken
A precommit token is included in the response of a BeginTransaction request if the read-write transaction is on a multiplexed session and a mutation_key was specified in the [BeginTransaction][google.spanner.v1.BeginTransactionRequest]. The precommit token with the highest sequence number from this transaction attempt should be passed to the [Commit][google.spanner.v1.Spanner.Commit] request for this transaction.
.google.spanner.v1.MultiplexedSessionPrecommitToken precommit_token = 3;- Specified by:
getPrecommitTokenin interfaceTransactionOrBuilder- Returns:
- The precommitToken.
-
setPrecommitToken
A precommit token is included in the response of a BeginTransaction request if the read-write transaction is on a multiplexed session and a mutation_key was specified in the [BeginTransaction][google.spanner.v1.BeginTransactionRequest]. The precommit token with the highest sequence number from this transaction attempt should be passed to the [Commit][google.spanner.v1.Spanner.Commit] request for this transaction.
.google.spanner.v1.MultiplexedSessionPrecommitToken precommit_token = 3; -
setPrecommitToken
public Transaction.Builder setPrecommitToken(MultiplexedSessionPrecommitToken.Builder builderForValue) A precommit token is included in the response of a BeginTransaction request if the read-write transaction is on a multiplexed session and a mutation_key was specified in the [BeginTransaction][google.spanner.v1.BeginTransactionRequest]. The precommit token with the highest sequence number from this transaction attempt should be passed to the [Commit][google.spanner.v1.Spanner.Commit] request for this transaction.
.google.spanner.v1.MultiplexedSessionPrecommitToken precommit_token = 3; -
mergePrecommitToken
A precommit token is included in the response of a BeginTransaction request if the read-write transaction is on a multiplexed session and a mutation_key was specified in the [BeginTransaction][google.spanner.v1.BeginTransactionRequest]. The precommit token with the highest sequence number from this transaction attempt should be passed to the [Commit][google.spanner.v1.Spanner.Commit] request for this transaction.
.google.spanner.v1.MultiplexedSessionPrecommitToken precommit_token = 3; -
clearPrecommitToken
A precommit token is included in the response of a BeginTransaction request if the read-write transaction is on a multiplexed session and a mutation_key was specified in the [BeginTransaction][google.spanner.v1.BeginTransactionRequest]. The precommit token with the highest sequence number from this transaction attempt should be passed to the [Commit][google.spanner.v1.Spanner.Commit] request for this transaction.
.google.spanner.v1.MultiplexedSessionPrecommitToken precommit_token = 3; -
getPrecommitTokenBuilder
A precommit token is included in the response of a BeginTransaction request if the read-write transaction is on a multiplexed session and a mutation_key was specified in the [BeginTransaction][google.spanner.v1.BeginTransactionRequest]. The precommit token with the highest sequence number from this transaction attempt should be passed to the [Commit][google.spanner.v1.Spanner.Commit] request for this transaction.
.google.spanner.v1.MultiplexedSessionPrecommitToken precommit_token = 3; -
getPrecommitTokenOrBuilder
A precommit token is included in the response of a BeginTransaction request if the read-write transaction is on a multiplexed session and a mutation_key was specified in the [BeginTransaction][google.spanner.v1.BeginTransactionRequest]. The precommit token with the highest sequence number from this transaction attempt should be passed to the [Commit][google.spanner.v1.Spanner.Commit] request for this transaction.
.google.spanner.v1.MultiplexedSessionPrecommitToken precommit_token = 3;- Specified by:
getPrecommitTokenOrBuilderin interfaceTransactionOrBuilder
-
hasCacheUpdate
public boolean hasCacheUpdate()Optional. A cache update expresses a set of changes the client should incorporate into its location cache. The client should discard the changes if they are older than the data it already has. This data can be obtained in response to requests that included a `RoutingHint` field, but may also be obtained by explicit location-fetching RPCs which may be added in the future.
.google.spanner.v1.CacheUpdate cache_update = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
hasCacheUpdatein interfaceTransactionOrBuilder- Returns:
- Whether the cacheUpdate field is set.
-
getCacheUpdate
Optional. A cache update expresses a set of changes the client should incorporate into its location cache. The client should discard the changes if they are older than the data it already has. This data can be obtained in response to requests that included a `RoutingHint` field, but may also be obtained by explicit location-fetching RPCs which may be added in the future.
.google.spanner.v1.CacheUpdate cache_update = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getCacheUpdatein interfaceTransactionOrBuilder- Returns:
- The cacheUpdate.
-
setCacheUpdate
Optional. A cache update expresses a set of changes the client should incorporate into its location cache. The client should discard the changes if they are older than the data it already has. This data can be obtained in response to requests that included a `RoutingHint` field, but may also be obtained by explicit location-fetching RPCs which may be added in the future.
.google.spanner.v1.CacheUpdate cache_update = 5 [(.google.api.field_behavior) = OPTIONAL]; -
setCacheUpdate
Optional. A cache update expresses a set of changes the client should incorporate into its location cache. The client should discard the changes if they are older than the data it already has. This data can be obtained in response to requests that included a `RoutingHint` field, but may also be obtained by explicit location-fetching RPCs which may be added in the future.
.google.spanner.v1.CacheUpdate cache_update = 5 [(.google.api.field_behavior) = OPTIONAL]; -
mergeCacheUpdate
Optional. A cache update expresses a set of changes the client should incorporate into its location cache. The client should discard the changes if they are older than the data it already has. This data can be obtained in response to requests that included a `RoutingHint` field, but may also be obtained by explicit location-fetching RPCs which may be added in the future.
.google.spanner.v1.CacheUpdate cache_update = 5 [(.google.api.field_behavior) = OPTIONAL]; -
clearCacheUpdate
Optional. A cache update expresses a set of changes the client should incorporate into its location cache. The client should discard the changes if they are older than the data it already has. This data can be obtained in response to requests that included a `RoutingHint` field, but may also be obtained by explicit location-fetching RPCs which may be added in the future.
.google.spanner.v1.CacheUpdate cache_update = 5 [(.google.api.field_behavior) = OPTIONAL]; -
getCacheUpdateBuilder
Optional. A cache update expresses a set of changes the client should incorporate into its location cache. The client should discard the changes if they are older than the data it already has. This data can be obtained in response to requests that included a `RoutingHint` field, but may also be obtained by explicit location-fetching RPCs which may be added in the future.
.google.spanner.v1.CacheUpdate cache_update = 5 [(.google.api.field_behavior) = OPTIONAL]; -
getCacheUpdateOrBuilder
Optional. A cache update expresses a set of changes the client should incorporate into its location cache. The client should discard the changes if they are older than the data it already has. This data can be obtained in response to requests that included a `RoutingHint` field, but may also be obtained by explicit location-fetching RPCs which may be added in the future.
.google.spanner.v1.CacheUpdate cache_update = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getCacheUpdateOrBuilderin interfaceTransactionOrBuilder
-