Package com.google.spanner.v1
Class TransactionOptions.ReadOnly.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.ReadOnly.Builder>
-
- com.google.spanner.v1.TransactionOptions.ReadOnly.Builder
-
- All Implemented Interfaces:
com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,TransactionOptions.ReadOnlyOrBuilder
,Cloneable
- Enclosing class:
- TransactionOptions.ReadOnly
public static final class TransactionOptions.ReadOnly.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.ReadOnly.Builder> implements TransactionOptions.ReadOnlyOrBuilder
Message type to initiate a read-only transaction.
Protobuf typegoogle.spanner.v1.TransactionOptions.ReadOnly
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TransactionOptions.ReadOnly.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
TransactionOptions.ReadOnly
build()
TransactionOptions.ReadOnly
buildPartial()
TransactionOptions.ReadOnly.Builder
clear()
TransactionOptions.ReadOnly.Builder
clearExactStaleness()
Executes all reads at a timestamp that is `exact_staleness` old.TransactionOptions.ReadOnly.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
TransactionOptions.ReadOnly.Builder
clearMaxStaleness()
Read data at a timestamp >= `NOW - max_staleness` seconds.TransactionOptions.ReadOnly.Builder
clearMinReadTimestamp()
Executes all reads at a timestamp >= `min_read_timestamp`.TransactionOptions.ReadOnly.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
TransactionOptions.ReadOnly.Builder
clearReadTimestamp()
Executes all reads at the given timestamp.TransactionOptions.ReadOnly.Builder
clearReturnReadTimestamp()
If true, the Cloud Spanner-selected read timestamp is included in the [Transaction][google.spanner.v1.Transaction] message that describes the transaction.TransactionOptions.ReadOnly.Builder
clearStrong()
Read at a timestamp where all previously committed transactions are visible.TransactionOptions.ReadOnly.Builder
clearTimestampBound()
TransactionOptions.ReadOnly.Builder
clone()
TransactionOptions.ReadOnly
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
com.google.protobuf.Duration
getExactStaleness()
Executes all reads at a timestamp that is `exact_staleness` old.com.google.protobuf.Duration.Builder
getExactStalenessBuilder()
Executes all reads at a timestamp that is `exact_staleness` old.com.google.protobuf.DurationOrBuilder
getExactStalenessOrBuilder()
Executes all reads at a timestamp that is `exact_staleness` old.com.google.protobuf.Duration
getMaxStaleness()
Read data at a timestamp >= `NOW - max_staleness` seconds.com.google.protobuf.Duration.Builder
getMaxStalenessBuilder()
Read data at a timestamp >= `NOW - max_staleness` seconds.com.google.protobuf.DurationOrBuilder
getMaxStalenessOrBuilder()
Read data at a timestamp >= `NOW - max_staleness` seconds.com.google.protobuf.Timestamp
getMinReadTimestamp()
Executes all reads at a timestamp >= `min_read_timestamp`.com.google.protobuf.Timestamp.Builder
getMinReadTimestampBuilder()
Executes all reads at a timestamp >= `min_read_timestamp`.com.google.protobuf.TimestampOrBuilder
getMinReadTimestampOrBuilder()
Executes all reads at a timestamp >= `min_read_timestamp`.com.google.protobuf.Timestamp
getReadTimestamp()
Executes all reads at the given timestamp.com.google.protobuf.Timestamp.Builder
getReadTimestampBuilder()
Executes all reads at the given timestamp.com.google.protobuf.TimestampOrBuilder
getReadTimestampOrBuilder()
Executes all reads at the given timestamp.boolean
getReturnReadTimestamp()
If true, the Cloud Spanner-selected read timestamp is included in the [Transaction][google.spanner.v1.Transaction] message that describes the transaction.boolean
getStrong()
Read at a timestamp where all previously committed transactions are visible.TransactionOptions.ReadOnly.TimestampBoundCase
getTimestampBoundCase()
boolean
hasExactStaleness()
Executes all reads at a timestamp that is `exact_staleness` old.boolean
hasMaxStaleness()
Read data at a timestamp >= `NOW - max_staleness` seconds.boolean
hasMinReadTimestamp()
Executes all reads at a timestamp >= `min_read_timestamp`.boolean
hasReadTimestamp()
Executes all reads at the given timestamp.boolean
hasStrong()
Read at a timestamp where all previously committed transactions are visible.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
TransactionOptions.ReadOnly.Builder
mergeExactStaleness(com.google.protobuf.Duration value)
Executes all reads at a timestamp that is `exact_staleness` old.TransactionOptions.ReadOnly.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
TransactionOptions.ReadOnly.Builder
mergeFrom(com.google.protobuf.Message other)
TransactionOptions.ReadOnly.Builder
mergeFrom(TransactionOptions.ReadOnly other)
TransactionOptions.ReadOnly.Builder
mergeMaxStaleness(com.google.protobuf.Duration value)
Read data at a timestamp >= `NOW - max_staleness` seconds.TransactionOptions.ReadOnly.Builder
mergeMinReadTimestamp(com.google.protobuf.Timestamp value)
Executes all reads at a timestamp >= `min_read_timestamp`.TransactionOptions.ReadOnly.Builder
mergeReadTimestamp(com.google.protobuf.Timestamp value)
Executes all reads at the given timestamp.TransactionOptions.ReadOnly.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
TransactionOptions.ReadOnly.Builder
setExactStaleness(com.google.protobuf.Duration value)
Executes all reads at a timestamp that is `exact_staleness` old.TransactionOptions.ReadOnly.Builder
setExactStaleness(com.google.protobuf.Duration.Builder builderForValue)
Executes all reads at a timestamp that is `exact_staleness` old.TransactionOptions.ReadOnly.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
TransactionOptions.ReadOnly.Builder
setMaxStaleness(com.google.protobuf.Duration value)
Read data at a timestamp >= `NOW - max_staleness` seconds.TransactionOptions.ReadOnly.Builder
setMaxStaleness(com.google.protobuf.Duration.Builder builderForValue)
Read data at a timestamp >= `NOW - max_staleness` seconds.TransactionOptions.ReadOnly.Builder
setMinReadTimestamp(com.google.protobuf.Timestamp value)
Executes all reads at a timestamp >= `min_read_timestamp`.TransactionOptions.ReadOnly.Builder
setMinReadTimestamp(com.google.protobuf.Timestamp.Builder builderForValue)
Executes all reads at a timestamp >= `min_read_timestamp`.TransactionOptions.ReadOnly.Builder
setReadTimestamp(com.google.protobuf.Timestamp value)
Executes all reads at the given timestamp.TransactionOptions.ReadOnly.Builder
setReadTimestamp(com.google.protobuf.Timestamp.Builder builderForValue)
Executes all reads at the given timestamp.TransactionOptions.ReadOnly.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
TransactionOptions.ReadOnly.Builder
setReturnReadTimestamp(boolean value)
If true, the Cloud Spanner-selected read timestamp is included in the [Transaction][google.spanner.v1.Transaction] message that describes the transaction.TransactionOptions.ReadOnly.Builder
setStrong(boolean value)
Read at a timestamp where all previously committed transactions are visible.TransactionOptions.ReadOnly.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.ReadOnly.Builder>
-
clear
public TransactionOptions.ReadOnly.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.ReadOnly.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.ReadOnly.Builder>
-
getDefaultInstanceForType
public TransactionOptions.ReadOnly getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public TransactionOptions.ReadOnly build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public TransactionOptions.ReadOnly buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public TransactionOptions.ReadOnly.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.ReadOnly.Builder>
-
setField
public TransactionOptions.ReadOnly.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.ReadOnly.Builder>
-
clearField
public TransactionOptions.ReadOnly.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.ReadOnly.Builder>
-
clearOneof
public TransactionOptions.ReadOnly.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.ReadOnly.Builder>
-
setRepeatedField
public TransactionOptions.ReadOnly.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.ReadOnly.Builder>
-
addRepeatedField
public TransactionOptions.ReadOnly.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.ReadOnly.Builder>
-
mergeFrom
public TransactionOptions.ReadOnly.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<TransactionOptions.ReadOnly.Builder>
-
mergeFrom
public TransactionOptions.ReadOnly.Builder mergeFrom(TransactionOptions.ReadOnly other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.ReadOnly.Builder>
-
mergeFrom
public TransactionOptions.ReadOnly.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<TransactionOptions.ReadOnly.Builder>
- Throws:
IOException
-
getTimestampBoundCase
public TransactionOptions.ReadOnly.TimestampBoundCase getTimestampBoundCase()
- Specified by:
getTimestampBoundCase
in interfaceTransactionOptions.ReadOnlyOrBuilder
-
clearTimestampBound
public TransactionOptions.ReadOnly.Builder clearTimestampBound()
-
hasStrong
public boolean hasStrong()
Read at a timestamp where all previously committed transactions are visible.
bool strong = 1;
- Specified by:
hasStrong
in interfaceTransactionOptions.ReadOnlyOrBuilder
- Returns:
- Whether the strong field is set.
-
getStrong
public boolean getStrong()
Read at a timestamp where all previously committed transactions are visible.
bool strong = 1;
- Specified by:
getStrong
in interfaceTransactionOptions.ReadOnlyOrBuilder
- Returns:
- The strong.
-
setStrong
public TransactionOptions.ReadOnly.Builder setStrong(boolean value)
Read at a timestamp where all previously committed transactions are visible.
bool strong = 1;
- Parameters:
value
- The strong to set.- Returns:
- This builder for chaining.
-
clearStrong
public TransactionOptions.ReadOnly.Builder clearStrong()
Read at a timestamp where all previously committed transactions are visible.
bool strong = 1;
- Returns:
- This builder for chaining.
-
hasMinReadTimestamp
public boolean hasMinReadTimestamp()
Executes all reads at a timestamp >= `min_read_timestamp`. This is useful for requesting fresher data than some previous read, or data that is fresh enough to observe the effects of some previously committed transaction whose timestamp is known. Note that this option can only be used in single-use transactions. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example: `"2014-10-02T15:01:23.045123456Z"`.
.google.protobuf.Timestamp min_read_timestamp = 2;
- Specified by:
hasMinReadTimestamp
in interfaceTransactionOptions.ReadOnlyOrBuilder
- Returns:
- Whether the minReadTimestamp field is set.
-
getMinReadTimestamp
public com.google.protobuf.Timestamp getMinReadTimestamp()
Executes all reads at a timestamp >= `min_read_timestamp`. This is useful for requesting fresher data than some previous read, or data that is fresh enough to observe the effects of some previously committed transaction whose timestamp is known. Note that this option can only be used in single-use transactions. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example: `"2014-10-02T15:01:23.045123456Z"`.
.google.protobuf.Timestamp min_read_timestamp = 2;
- Specified by:
getMinReadTimestamp
in interfaceTransactionOptions.ReadOnlyOrBuilder
- Returns:
- The minReadTimestamp.
-
setMinReadTimestamp
public TransactionOptions.ReadOnly.Builder setMinReadTimestamp(com.google.protobuf.Timestamp value)
Executes all reads at a timestamp >= `min_read_timestamp`. This is useful for requesting fresher data than some previous read, or data that is fresh enough to observe the effects of some previously committed transaction whose timestamp is known. Note that this option can only be used in single-use transactions. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example: `"2014-10-02T15:01:23.045123456Z"`.
.google.protobuf.Timestamp min_read_timestamp = 2;
-
setMinReadTimestamp
public TransactionOptions.ReadOnly.Builder setMinReadTimestamp(com.google.protobuf.Timestamp.Builder builderForValue)
Executes all reads at a timestamp >= `min_read_timestamp`. This is useful for requesting fresher data than some previous read, or data that is fresh enough to observe the effects of some previously committed transaction whose timestamp is known. Note that this option can only be used in single-use transactions. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example: `"2014-10-02T15:01:23.045123456Z"`.
.google.protobuf.Timestamp min_read_timestamp = 2;
-
mergeMinReadTimestamp
public TransactionOptions.ReadOnly.Builder mergeMinReadTimestamp(com.google.protobuf.Timestamp value)
Executes all reads at a timestamp >= `min_read_timestamp`. This is useful for requesting fresher data than some previous read, or data that is fresh enough to observe the effects of some previously committed transaction whose timestamp is known. Note that this option can only be used in single-use transactions. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example: `"2014-10-02T15:01:23.045123456Z"`.
.google.protobuf.Timestamp min_read_timestamp = 2;
-
clearMinReadTimestamp
public TransactionOptions.ReadOnly.Builder clearMinReadTimestamp()
Executes all reads at a timestamp >= `min_read_timestamp`. This is useful for requesting fresher data than some previous read, or data that is fresh enough to observe the effects of some previously committed transaction whose timestamp is known. Note that this option can only be used in single-use transactions. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example: `"2014-10-02T15:01:23.045123456Z"`.
.google.protobuf.Timestamp min_read_timestamp = 2;
-
getMinReadTimestampBuilder
public com.google.protobuf.Timestamp.Builder getMinReadTimestampBuilder()
Executes all reads at a timestamp >= `min_read_timestamp`. This is useful for requesting fresher data than some previous read, or data that is fresh enough to observe the effects of some previously committed transaction whose timestamp is known. Note that this option can only be used in single-use transactions. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example: `"2014-10-02T15:01:23.045123456Z"`.
.google.protobuf.Timestamp min_read_timestamp = 2;
-
getMinReadTimestampOrBuilder
public com.google.protobuf.TimestampOrBuilder getMinReadTimestampOrBuilder()
Executes all reads at a timestamp >= `min_read_timestamp`. This is useful for requesting fresher data than some previous read, or data that is fresh enough to observe the effects of some previously committed transaction whose timestamp is known. Note that this option can only be used in single-use transactions. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example: `"2014-10-02T15:01:23.045123456Z"`.
.google.protobuf.Timestamp min_read_timestamp = 2;
- Specified by:
getMinReadTimestampOrBuilder
in interfaceTransactionOptions.ReadOnlyOrBuilder
-
hasMaxStaleness
public boolean hasMaxStaleness()
Read data at a timestamp >= `NOW - max_staleness` seconds. Guarantees that all writes that have committed more than the specified number of seconds ago are visible. Because Cloud Spanner chooses the exact timestamp, this mode works even if the client's local clock is substantially skewed from Cloud Spanner commit timestamps. Useful for reading the freshest data available at a nearby replica, while bounding the possible staleness if the local replica has fallen behind. Note that this option can only be used in single-use transactions.
.google.protobuf.Duration max_staleness = 3;
- Specified by:
hasMaxStaleness
in interfaceTransactionOptions.ReadOnlyOrBuilder
- Returns:
- Whether the maxStaleness field is set.
-
getMaxStaleness
public com.google.protobuf.Duration getMaxStaleness()
Read data at a timestamp >= `NOW - max_staleness` seconds. Guarantees that all writes that have committed more than the specified number of seconds ago are visible. Because Cloud Spanner chooses the exact timestamp, this mode works even if the client's local clock is substantially skewed from Cloud Spanner commit timestamps. Useful for reading the freshest data available at a nearby replica, while bounding the possible staleness if the local replica has fallen behind. Note that this option can only be used in single-use transactions.
.google.protobuf.Duration max_staleness = 3;
- Specified by:
getMaxStaleness
in interfaceTransactionOptions.ReadOnlyOrBuilder
- Returns:
- The maxStaleness.
-
setMaxStaleness
public TransactionOptions.ReadOnly.Builder setMaxStaleness(com.google.protobuf.Duration value)
Read data at a timestamp >= `NOW - max_staleness` seconds. Guarantees that all writes that have committed more than the specified number of seconds ago are visible. Because Cloud Spanner chooses the exact timestamp, this mode works even if the client's local clock is substantially skewed from Cloud Spanner commit timestamps. Useful for reading the freshest data available at a nearby replica, while bounding the possible staleness if the local replica has fallen behind. Note that this option can only be used in single-use transactions.
.google.protobuf.Duration max_staleness = 3;
-
setMaxStaleness
public TransactionOptions.ReadOnly.Builder setMaxStaleness(com.google.protobuf.Duration.Builder builderForValue)
Read data at a timestamp >= `NOW - max_staleness` seconds. Guarantees that all writes that have committed more than the specified number of seconds ago are visible. Because Cloud Spanner chooses the exact timestamp, this mode works even if the client's local clock is substantially skewed from Cloud Spanner commit timestamps. Useful for reading the freshest data available at a nearby replica, while bounding the possible staleness if the local replica has fallen behind. Note that this option can only be used in single-use transactions.
.google.protobuf.Duration max_staleness = 3;
-
mergeMaxStaleness
public TransactionOptions.ReadOnly.Builder mergeMaxStaleness(com.google.protobuf.Duration value)
Read data at a timestamp >= `NOW - max_staleness` seconds. Guarantees that all writes that have committed more than the specified number of seconds ago are visible. Because Cloud Spanner chooses the exact timestamp, this mode works even if the client's local clock is substantially skewed from Cloud Spanner commit timestamps. Useful for reading the freshest data available at a nearby replica, while bounding the possible staleness if the local replica has fallen behind. Note that this option can only be used in single-use transactions.
.google.protobuf.Duration max_staleness = 3;
-
clearMaxStaleness
public TransactionOptions.ReadOnly.Builder clearMaxStaleness()
Read data at a timestamp >= `NOW - max_staleness` seconds. Guarantees that all writes that have committed more than the specified number of seconds ago are visible. Because Cloud Spanner chooses the exact timestamp, this mode works even if the client's local clock is substantially skewed from Cloud Spanner commit timestamps. Useful for reading the freshest data available at a nearby replica, while bounding the possible staleness if the local replica has fallen behind. Note that this option can only be used in single-use transactions.
.google.protobuf.Duration max_staleness = 3;
-
getMaxStalenessBuilder
public com.google.protobuf.Duration.Builder getMaxStalenessBuilder()
Read data at a timestamp >= `NOW - max_staleness` seconds. Guarantees that all writes that have committed more than the specified number of seconds ago are visible. Because Cloud Spanner chooses the exact timestamp, this mode works even if the client's local clock is substantially skewed from Cloud Spanner commit timestamps. Useful for reading the freshest data available at a nearby replica, while bounding the possible staleness if the local replica has fallen behind. Note that this option can only be used in single-use transactions.
.google.protobuf.Duration max_staleness = 3;
-
getMaxStalenessOrBuilder
public com.google.protobuf.DurationOrBuilder getMaxStalenessOrBuilder()
Read data at a timestamp >= `NOW - max_staleness` seconds. Guarantees that all writes that have committed more than the specified number of seconds ago are visible. Because Cloud Spanner chooses the exact timestamp, this mode works even if the client's local clock is substantially skewed from Cloud Spanner commit timestamps. Useful for reading the freshest data available at a nearby replica, while bounding the possible staleness if the local replica has fallen behind. Note that this option can only be used in single-use transactions.
.google.protobuf.Duration max_staleness = 3;
- Specified by:
getMaxStalenessOrBuilder
in interfaceTransactionOptions.ReadOnlyOrBuilder
-
hasReadTimestamp
public boolean hasReadTimestamp()
Executes all reads at the given timestamp. Unlike other modes, reads at a specific timestamp are repeatable; the same read at the same timestamp always returns the same data. If the timestamp is in the future, the read will block until the specified timestamp, modulo the read's deadline. Useful for large scale consistent reads such as mapreduces, or for coordinating many reads against a consistent snapshot of the data. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example: `"2014-10-02T15:01:23.045123456Z"`.
.google.protobuf.Timestamp read_timestamp = 4;
- Specified by:
hasReadTimestamp
in interfaceTransactionOptions.ReadOnlyOrBuilder
- Returns:
- Whether the readTimestamp field is set.
-
getReadTimestamp
public com.google.protobuf.Timestamp getReadTimestamp()
Executes all reads at the given timestamp. Unlike other modes, reads at a specific timestamp are repeatable; the same read at the same timestamp always returns the same data. If the timestamp is in the future, the read will block until the specified timestamp, modulo the read's deadline. Useful for large scale consistent reads such as mapreduces, or for coordinating many reads against a consistent snapshot of the data. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example: `"2014-10-02T15:01:23.045123456Z"`.
.google.protobuf.Timestamp read_timestamp = 4;
- Specified by:
getReadTimestamp
in interfaceTransactionOptions.ReadOnlyOrBuilder
- Returns:
- The readTimestamp.
-
setReadTimestamp
public TransactionOptions.ReadOnly.Builder setReadTimestamp(com.google.protobuf.Timestamp value)
Executes all reads at the given timestamp. Unlike other modes, reads at a specific timestamp are repeatable; the same read at the same timestamp always returns the same data. If the timestamp is in the future, the read will block until the specified timestamp, modulo the read's deadline. Useful for large scale consistent reads such as mapreduces, or for coordinating many reads against a consistent snapshot of the data. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example: `"2014-10-02T15:01:23.045123456Z"`.
.google.protobuf.Timestamp read_timestamp = 4;
-
setReadTimestamp
public TransactionOptions.ReadOnly.Builder setReadTimestamp(com.google.protobuf.Timestamp.Builder builderForValue)
Executes all reads at the given timestamp. Unlike other modes, reads at a specific timestamp are repeatable; the same read at the same timestamp always returns the same data. If the timestamp is in the future, the read will block until the specified timestamp, modulo the read's deadline. Useful for large scale consistent reads such as mapreduces, or for coordinating many reads against a consistent snapshot of the data. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example: `"2014-10-02T15:01:23.045123456Z"`.
.google.protobuf.Timestamp read_timestamp = 4;
-
mergeReadTimestamp
public TransactionOptions.ReadOnly.Builder mergeReadTimestamp(com.google.protobuf.Timestamp value)
Executes all reads at the given timestamp. Unlike other modes, reads at a specific timestamp are repeatable; the same read at the same timestamp always returns the same data. If the timestamp is in the future, the read will block until the specified timestamp, modulo the read's deadline. Useful for large scale consistent reads such as mapreduces, or for coordinating many reads against a consistent snapshot of the data. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example: `"2014-10-02T15:01:23.045123456Z"`.
.google.protobuf.Timestamp read_timestamp = 4;
-
clearReadTimestamp
public TransactionOptions.ReadOnly.Builder clearReadTimestamp()
Executes all reads at the given timestamp. Unlike other modes, reads at a specific timestamp are repeatable; the same read at the same timestamp always returns the same data. If the timestamp is in the future, the read will block until the specified timestamp, modulo the read's deadline. Useful for large scale consistent reads such as mapreduces, or for coordinating many reads against a consistent snapshot of the data. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example: `"2014-10-02T15:01:23.045123456Z"`.
.google.protobuf.Timestamp read_timestamp = 4;
-
getReadTimestampBuilder
public com.google.protobuf.Timestamp.Builder getReadTimestampBuilder()
Executes all reads at the given timestamp. Unlike other modes, reads at a specific timestamp are repeatable; the same read at the same timestamp always returns the same data. If the timestamp is in the future, the read will block until the specified timestamp, modulo the read's deadline. Useful for large scale consistent reads such as mapreduces, or for coordinating many reads against a consistent snapshot of the data. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example: `"2014-10-02T15:01:23.045123456Z"`.
.google.protobuf.Timestamp read_timestamp = 4;
-
getReadTimestampOrBuilder
public com.google.protobuf.TimestampOrBuilder getReadTimestampOrBuilder()
Executes all reads at the given timestamp. Unlike other modes, reads at a specific timestamp are repeatable; the same read at the same timestamp always returns the same data. If the timestamp is in the future, the read will block until the specified timestamp, modulo the read's deadline. Useful for large scale consistent reads such as mapreduces, or for coordinating many reads against a consistent snapshot of the data. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example: `"2014-10-02T15:01:23.045123456Z"`.
.google.protobuf.Timestamp read_timestamp = 4;
- Specified by:
getReadTimestampOrBuilder
in interfaceTransactionOptions.ReadOnlyOrBuilder
-
hasExactStaleness
public boolean hasExactStaleness()
Executes all reads at a timestamp that is `exact_staleness` old. The timestamp is chosen soon after the read is started. Guarantees that all writes that have committed more than the specified number of seconds ago are visible. Because Cloud Spanner chooses the exact timestamp, this mode works even if the client's local clock is substantially skewed from Cloud Spanner commit timestamps. Useful for reading at nearby replicas without the distributed timestamp negotiation overhead of `max_staleness`.
.google.protobuf.Duration exact_staleness = 5;
- Specified by:
hasExactStaleness
in interfaceTransactionOptions.ReadOnlyOrBuilder
- Returns:
- Whether the exactStaleness field is set.
-
getExactStaleness
public com.google.protobuf.Duration getExactStaleness()
Executes all reads at a timestamp that is `exact_staleness` old. The timestamp is chosen soon after the read is started. Guarantees that all writes that have committed more than the specified number of seconds ago are visible. Because Cloud Spanner chooses the exact timestamp, this mode works even if the client's local clock is substantially skewed from Cloud Spanner commit timestamps. Useful for reading at nearby replicas without the distributed timestamp negotiation overhead of `max_staleness`.
.google.protobuf.Duration exact_staleness = 5;
- Specified by:
getExactStaleness
in interfaceTransactionOptions.ReadOnlyOrBuilder
- Returns:
- The exactStaleness.
-
setExactStaleness
public TransactionOptions.ReadOnly.Builder setExactStaleness(com.google.protobuf.Duration value)
Executes all reads at a timestamp that is `exact_staleness` old. The timestamp is chosen soon after the read is started. Guarantees that all writes that have committed more than the specified number of seconds ago are visible. Because Cloud Spanner chooses the exact timestamp, this mode works even if the client's local clock is substantially skewed from Cloud Spanner commit timestamps. Useful for reading at nearby replicas without the distributed timestamp negotiation overhead of `max_staleness`.
.google.protobuf.Duration exact_staleness = 5;
-
setExactStaleness
public TransactionOptions.ReadOnly.Builder setExactStaleness(com.google.protobuf.Duration.Builder builderForValue)
Executes all reads at a timestamp that is `exact_staleness` old. The timestamp is chosen soon after the read is started. Guarantees that all writes that have committed more than the specified number of seconds ago are visible. Because Cloud Spanner chooses the exact timestamp, this mode works even if the client's local clock is substantially skewed from Cloud Spanner commit timestamps. Useful for reading at nearby replicas without the distributed timestamp negotiation overhead of `max_staleness`.
.google.protobuf.Duration exact_staleness = 5;
-
mergeExactStaleness
public TransactionOptions.ReadOnly.Builder mergeExactStaleness(com.google.protobuf.Duration value)
Executes all reads at a timestamp that is `exact_staleness` old. The timestamp is chosen soon after the read is started. Guarantees that all writes that have committed more than the specified number of seconds ago are visible. Because Cloud Spanner chooses the exact timestamp, this mode works even if the client's local clock is substantially skewed from Cloud Spanner commit timestamps. Useful for reading at nearby replicas without the distributed timestamp negotiation overhead of `max_staleness`.
.google.protobuf.Duration exact_staleness = 5;
-
clearExactStaleness
public TransactionOptions.ReadOnly.Builder clearExactStaleness()
Executes all reads at a timestamp that is `exact_staleness` old. The timestamp is chosen soon after the read is started. Guarantees that all writes that have committed more than the specified number of seconds ago are visible. Because Cloud Spanner chooses the exact timestamp, this mode works even if the client's local clock is substantially skewed from Cloud Spanner commit timestamps. Useful for reading at nearby replicas without the distributed timestamp negotiation overhead of `max_staleness`.
.google.protobuf.Duration exact_staleness = 5;
-
getExactStalenessBuilder
public com.google.protobuf.Duration.Builder getExactStalenessBuilder()
Executes all reads at a timestamp that is `exact_staleness` old. The timestamp is chosen soon after the read is started. Guarantees that all writes that have committed more than the specified number of seconds ago are visible. Because Cloud Spanner chooses the exact timestamp, this mode works even if the client's local clock is substantially skewed from Cloud Spanner commit timestamps. Useful for reading at nearby replicas without the distributed timestamp negotiation overhead of `max_staleness`.
.google.protobuf.Duration exact_staleness = 5;
-
getExactStalenessOrBuilder
public com.google.protobuf.DurationOrBuilder getExactStalenessOrBuilder()
Executes all reads at a timestamp that is `exact_staleness` old. The timestamp is chosen soon after the read is started. Guarantees that all writes that have committed more than the specified number of seconds ago are visible. Because Cloud Spanner chooses the exact timestamp, this mode works even if the client's local clock is substantially skewed from Cloud Spanner commit timestamps. Useful for reading at nearby replicas without the distributed timestamp negotiation overhead of `max_staleness`.
.google.protobuf.Duration exact_staleness = 5;
- Specified by:
getExactStalenessOrBuilder
in interfaceTransactionOptions.ReadOnlyOrBuilder
-
getReturnReadTimestamp
public boolean getReturnReadTimestamp()
If true, the Cloud Spanner-selected read timestamp is included in the [Transaction][google.spanner.v1.Transaction] message that describes the transaction.
bool return_read_timestamp = 6;
- Specified by:
getReturnReadTimestamp
in interfaceTransactionOptions.ReadOnlyOrBuilder
- Returns:
- The returnReadTimestamp.
-
setReturnReadTimestamp
public TransactionOptions.ReadOnly.Builder setReturnReadTimestamp(boolean value)
If true, the Cloud Spanner-selected read timestamp is included in the [Transaction][google.spanner.v1.Transaction] message that describes the transaction.
bool return_read_timestamp = 6;
- Parameters:
value
- The returnReadTimestamp to set.- Returns:
- This builder for chaining.
-
clearReturnReadTimestamp
public TransactionOptions.ReadOnly.Builder clearReturnReadTimestamp()
If true, the Cloud Spanner-selected read timestamp is included in the [Transaction][google.spanner.v1.Transaction] message that describes the transaction.
bool return_read_timestamp = 6;
- Returns:
- This builder for chaining.
-
setUnknownFields
public final TransactionOptions.ReadOnly.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.ReadOnly.Builder>
-
mergeUnknownFields
public final TransactionOptions.ReadOnly.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.ReadOnly.Builder>
-
-