Class DirectedReadOptions

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
com.google.spanner.v1.DirectedReadOptions
All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, DirectedReadOptionsOrBuilder, Serializable

public final class DirectedReadOptions extends com.google.protobuf.GeneratedMessageV3 implements DirectedReadOptionsOrBuilder
 The DirectedReadOptions can be used to indicate which replicas or regions
 should be used for non-transactional reads or queries.

 DirectedReadOptions may only be specified for a read-only transaction,
 otherwise the API will return an `INVALID_ARGUMENT` error.
 
Protobuf type google.spanner.v1.DirectedReadOptions
See Also:
  • Field Details

    • INCLUDE_REPLICAS_FIELD_NUMBER

      public static final int INCLUDE_REPLICAS_FIELD_NUMBER
      See Also:
    • EXCLUDE_REPLICAS_FIELD_NUMBER

      public static final int EXCLUDE_REPLICAS_FIELD_NUMBER
      See Also:
  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • 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
    • getReplicasCase

      public DirectedReadOptions.ReplicasCase getReplicasCase()
      Specified by:
      getReplicasCase in interface DirectedReadOptionsOrBuilder
    • hasIncludeReplicas

      public boolean hasIncludeReplicas()
       Include_replicas indicates the order of replicas (as they appear in
       this list) to process the request. If auto_failover_disabled is set to
       true and all replicas are exhausted without finding a healthy replica,
       Spanner will wait for a replica in the list to become available, requests
       may fail due to `DEADLINE_EXCEEDED` errors.
       
      .google.spanner.v1.DirectedReadOptions.IncludeReplicas include_replicas = 1;
      Specified by:
      hasIncludeReplicas in interface DirectedReadOptionsOrBuilder
      Returns:
      Whether the includeReplicas field is set.
    • getIncludeReplicas

      public DirectedReadOptions.IncludeReplicas getIncludeReplicas()
       Include_replicas indicates the order of replicas (as they appear in
       this list) to process the request. If auto_failover_disabled is set to
       true and all replicas are exhausted without finding a healthy replica,
       Spanner will wait for a replica in the list to become available, requests
       may fail due to `DEADLINE_EXCEEDED` errors.
       
      .google.spanner.v1.DirectedReadOptions.IncludeReplicas include_replicas = 1;
      Specified by:
      getIncludeReplicas in interface DirectedReadOptionsOrBuilder
      Returns:
      The includeReplicas.
    • getIncludeReplicasOrBuilder

      public DirectedReadOptions.IncludeReplicasOrBuilder getIncludeReplicasOrBuilder()
       Include_replicas indicates the order of replicas (as they appear in
       this list) to process the request. If auto_failover_disabled is set to
       true and all replicas are exhausted without finding a healthy replica,
       Spanner will wait for a replica in the list to become available, requests
       may fail due to `DEADLINE_EXCEEDED` errors.
       
      .google.spanner.v1.DirectedReadOptions.IncludeReplicas include_replicas = 1;
      Specified by:
      getIncludeReplicasOrBuilder in interface DirectedReadOptionsOrBuilder
    • hasExcludeReplicas

      public boolean hasExcludeReplicas()
       Exclude_replicas indicates that specified replicas should be excluded
       from serving requests. Spanner will not route requests to the replicas
       in this list.
       
      .google.spanner.v1.DirectedReadOptions.ExcludeReplicas exclude_replicas = 2;
      Specified by:
      hasExcludeReplicas in interface DirectedReadOptionsOrBuilder
      Returns:
      Whether the excludeReplicas field is set.
    • getExcludeReplicas

      public DirectedReadOptions.ExcludeReplicas getExcludeReplicas()
       Exclude_replicas indicates that specified replicas should be excluded
       from serving requests. Spanner will not route requests to the replicas
       in this list.
       
      .google.spanner.v1.DirectedReadOptions.ExcludeReplicas exclude_replicas = 2;
      Specified by:
      getExcludeReplicas in interface DirectedReadOptionsOrBuilder
      Returns:
      The excludeReplicas.
    • getExcludeReplicasOrBuilder

      public DirectedReadOptions.ExcludeReplicasOrBuilder getExcludeReplicasOrBuilder()
       Exclude_replicas indicates that specified replicas should be excluded
       from serving requests. Spanner will not route requests to the replicas
       in this list.
       
      .google.spanner.v1.DirectedReadOptions.ExcludeReplicas exclude_replicas = 2;
      Specified by:
      getExcludeReplicasOrBuilder in interface DirectedReadOptionsOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static DirectedReadOptions parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DirectedReadOptions parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DirectedReadOptions parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DirectedReadOptions parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DirectedReadOptions parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DirectedReadOptions parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DirectedReadOptions parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static DirectedReadOptions parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static DirectedReadOptions parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static DirectedReadOptions parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static DirectedReadOptions parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static DirectedReadOptions parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public DirectedReadOptions.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static DirectedReadOptions.Builder newBuilder()
    • newBuilder

      public static DirectedReadOptions.Builder newBuilder(DirectedReadOptions prototype)
    • toBuilder

      public DirectedReadOptions.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected DirectedReadOptions.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static DirectedReadOptions getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<DirectedReadOptions> parser()
    • getParserForType

      public com.google.protobuf.Parser<DirectedReadOptions> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public DirectedReadOptions getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder