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 type google.spanner.v1.TransactionOptions.ReadOnly
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.ReadOnly.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.ReadOnly.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.ReadOnly.Builder>
    • getDefaultInstanceForType

      public TransactionOptions.ReadOnly getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public TransactionOptions.ReadOnly buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.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 interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.ReadOnly.Builder>
    • clearField

      public TransactionOptions.ReadOnly.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.ReadOnly.Builder>
    • clearOneof

      public TransactionOptions.ReadOnly.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.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 interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.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 interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.ReadOnly.Builder>
    • mergeFrom

      public TransactionOptions.ReadOnly.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<TransactionOptions.ReadOnly.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.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 interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<TransactionOptions.ReadOnly.Builder>
      Throws:
      IOException
    • getTimestampBoundCase

      public TransactionOptions.ReadOnly.TimestampBoundCase getTimestampBoundCase()
      Specified by:
      getTimestampBoundCase in interface TransactionOptions.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 interface TransactionOptions.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 interface TransactionOptions.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

       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 interface TransactionOptions.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 interface TransactionOptions.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 interface TransactionOptions.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 interface TransactionOptions.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 interface TransactionOptions.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 interface TransactionOptions.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 interface TransactionOptions.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 interface TransactionOptions.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 interface TransactionOptions.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 interface TransactionOptions.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 interface TransactionOptions.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 interface TransactionOptions.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 interface TransactionOptions.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 interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.ReadOnly.Builder>
    • mergeUnknownFields

      public final TransactionOptions.ReadOnly.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TransactionOptions.ReadOnly.Builder>