Package com.google.spanner.v1
Class TransactionOptions.ReadOnly
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
com.google.spanner.v1.TransactionOptions.ReadOnly
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,TransactionOptions.ReadOnlyOrBuilder,Serializable
- Enclosing class:
- TransactionOptions
public static final class TransactionOptions.ReadOnly
extends com.google.protobuf.GeneratedMessageV3
implements TransactionOptions.ReadOnlyOrBuilder
Message type to initiate a read-only transaction.Protobuf type
google.spanner.v1.TransactionOptions.ReadOnly- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classMessage type to initiate a read-only transaction.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 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 TransactionOptions.ReadOnlystatic final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.DurationExecutes all reads at a timestamp that is `exact_staleness` old.com.google.protobuf.DurationOrBuilderExecutes all reads at a timestamp that is `exact_staleness` old.com.google.protobuf.DurationRead data at a timestamp >= `NOW - max_staleness` seconds.com.google.protobuf.DurationOrBuilderRead data at a timestamp >= `NOW - max_staleness` seconds.com.google.protobuf.TimestampExecutes all reads at a timestamp >= `min_read_timestamp`.com.google.protobuf.TimestampOrBuilderExecutes all reads at a timestamp >= `min_read_timestamp`.com.google.protobuf.Parser<TransactionOptions.ReadOnly>com.google.protobuf.TimestampExecutes all reads at the given timestamp.com.google.protobuf.TimestampOrBuilderExecutes all reads at the given timestamp.booleanIf true, the Cloud Spanner-selected read timestamp is included in the [Transaction][google.spanner.v1.Transaction] message that describes the transaction.intbooleanRead at a timestamp where all previously committed transactions are visible.booleanExecutes all reads at a timestamp that is `exact_staleness` old.inthashCode()booleanRead data at a timestamp >= `NOW - max_staleness` seconds.booleanExecutes all reads at a timestamp >= `min_read_timestamp`.booleanExecutes all reads at the given timestamp.booleanRead at a timestamp where all previously committed transactions are visible.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleannewBuilder(TransactionOptions.ReadOnly prototype) protected TransactionOptions.ReadOnly.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) static TransactionOptions.ReadOnlyparseDelimitedFrom(InputStream input) static TransactionOptions.ReadOnlyparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TransactionOptions.ReadOnlyparseFrom(byte[] data) static TransactionOptions.ReadOnlyparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TransactionOptions.ReadOnlyparseFrom(com.google.protobuf.ByteString data) static TransactionOptions.ReadOnlyparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TransactionOptions.ReadOnlyparseFrom(com.google.protobuf.CodedInputStream input) static TransactionOptions.ReadOnlyparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TransactionOptions.ReadOnlyparseFrom(InputStream input) static TransactionOptions.ReadOnlyparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TransactionOptions.ReadOnlyparseFrom(ByteBuffer data) static TransactionOptions.ReadOnlyparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<TransactionOptions.ReadOnly>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
-
STRONG_FIELD_NUMBER
public static final int STRONG_FIELD_NUMBER- See Also:
-
MIN_READ_TIMESTAMP_FIELD_NUMBER
public static final int MIN_READ_TIMESTAMP_FIELD_NUMBER- See Also:
-
MAX_STALENESS_FIELD_NUMBER
public static final int MAX_STALENESS_FIELD_NUMBER- See Also:
-
READ_TIMESTAMP_FIELD_NUMBER
public static final int READ_TIMESTAMP_FIELD_NUMBER- See Also:
-
EXACT_STALENESS_FIELD_NUMBER
public static final int EXACT_STALENESS_FIELD_NUMBER- See Also:
-
RETURN_READ_TIMESTAMP_FIELD_NUMBER
public static final int RETURN_READ_TIMESTAMP_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
-
getTimestampBoundCase
- Specified by:
getTimestampBoundCasein interfaceTransactionOptions.ReadOnlyOrBuilder
-
hasStrong
public boolean hasStrong()Read at a timestamp where all previously committed transactions are visible.
bool strong = 1;- Specified by:
hasStrongin 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:
getStrongin interfaceTransactionOptions.ReadOnlyOrBuilder- Returns:
- The strong.
-
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:
hasMinReadTimestampin 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:
getMinReadTimestampin interfaceTransactionOptions.ReadOnlyOrBuilder- Returns:
- The minReadTimestamp.
-
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:
getMinReadTimestampOrBuilderin 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:
hasMaxStalenessin 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:
getMaxStalenessin interfaceTransactionOptions.ReadOnlyOrBuilder- Returns:
- The maxStaleness.
-
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:
getMaxStalenessOrBuilderin 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:
hasReadTimestampin 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:
getReadTimestampin interfaceTransactionOptions.ReadOnlyOrBuilder- Returns:
- The readTimestamp.
-
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:
getReadTimestampOrBuilderin 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:
hasExactStalenessin 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:
getExactStalenessin interfaceTransactionOptions.ReadOnlyOrBuilder- Returns:
- The exactStaleness.
-
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:
getExactStalenessOrBuilderin 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:
getReturnReadTimestampin interfaceTransactionOptions.ReadOnlyOrBuilder- Returns:
- The returnReadTimestamp.
-
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 TransactionOptions.ReadOnly parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TransactionOptions.ReadOnly parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TransactionOptions.ReadOnly parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TransactionOptions.ReadOnly parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TransactionOptions.ReadOnly parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TransactionOptions.ReadOnly parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static TransactionOptions.ReadOnly parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static TransactionOptions.ReadOnly parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static TransactionOptions.ReadOnly parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static TransactionOptions.ReadOnly 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 TransactionOptions.ReadOnly.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
-