Class DirectedReadOptions.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<DirectedReadOptions.Builder>
com.google.spanner.v1.DirectedReadOptions.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, DirectedReadOptionsOrBuilder, Cloneable
Enclosing class:
DirectedReadOptions

public static final class DirectedReadOptions.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<DirectedReadOptions.Builder> 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
  • 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<DirectedReadOptions.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<DirectedReadOptions.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<DirectedReadOptions.Builder>
    • getDefaultInstanceForType

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

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

      public DirectedReadOptions 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<DirectedReadOptions.Builder>
    • setField

      public DirectedReadOptions.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<DirectedReadOptions.Builder>
    • clearField

      public DirectedReadOptions.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<DirectedReadOptions.Builder>
    • clearOneof

      public DirectedReadOptions.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<DirectedReadOptions.Builder>
    • setRepeatedField

      public DirectedReadOptions.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<DirectedReadOptions.Builder>
    • addRepeatedField

      public DirectedReadOptions.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<DirectedReadOptions.Builder>
    • mergeFrom

      public DirectedReadOptions.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<DirectedReadOptions.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<DirectedReadOptions.Builder>
    • mergeFrom

      public DirectedReadOptions.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<DirectedReadOptions.Builder>
      Throws:
      IOException
    • getReplicasCase

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

      public DirectedReadOptions.Builder clearReplicas()
    • 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.
    • setIncludeReplicas

       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;
    • setIncludeReplicas

      public DirectedReadOptions.Builder setIncludeReplicas(DirectedReadOptions.IncludeReplicas.Builder builderForValue)
       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;
    • mergeIncludeReplicas

       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;
    • clearIncludeReplicas

      public DirectedReadOptions.Builder clearIncludeReplicas()
       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;
    • getIncludeReplicasBuilder

      public DirectedReadOptions.IncludeReplicas.Builder getIncludeReplicasBuilder()
       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;
    • 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 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 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.
    • setExcludeReplicas

       Exclude_replicas indicates that 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;
    • setExcludeReplicas

      public DirectedReadOptions.Builder setExcludeReplicas(DirectedReadOptions.ExcludeReplicas.Builder builderForValue)
       Exclude_replicas indicates that 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;
    • mergeExcludeReplicas

       Exclude_replicas indicates that 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;
    • clearExcludeReplicas

      public DirectedReadOptions.Builder clearExcludeReplicas()
       Exclude_replicas indicates that 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;
    • getExcludeReplicasBuilder

      public DirectedReadOptions.ExcludeReplicas.Builder getExcludeReplicasBuilder()
       Exclude_replicas indicates that 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;
    • getExcludeReplicasOrBuilder

      public DirectedReadOptions.ExcludeReplicasOrBuilder getExcludeReplicasOrBuilder()
       Exclude_replicas indicates that 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
    • setUnknownFields

      public final DirectedReadOptions.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<DirectedReadOptions.Builder>
    • mergeUnknownFields

      public final DirectedReadOptions.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<DirectedReadOptions.Builder>