Class DirectedReadOptions.Builder (6.55.0)

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

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public DirectedReadOptions.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
DirectedReadOptions.Builder
Overrides

build()

public DirectedReadOptions build()
Returns
TypeDescription
DirectedReadOptions

buildPartial()

public DirectedReadOptions buildPartial()
Returns
TypeDescription
DirectedReadOptions

clear()

public DirectedReadOptions.Builder clear()
Returns
TypeDescription
DirectedReadOptions.Builder
Overrides

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;

Returns
TypeDescription
DirectedReadOptions.Builder

clearField(Descriptors.FieldDescriptor field)

public DirectedReadOptions.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
DirectedReadOptions.Builder
Overrides

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;

Returns
TypeDescription
DirectedReadOptions.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public DirectedReadOptions.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
DirectedReadOptions.Builder
Overrides

clearReplicas()

public DirectedReadOptions.Builder clearReplicas()
Returns
TypeDescription
DirectedReadOptions.Builder

clone()

public DirectedReadOptions.Builder clone()
Returns
TypeDescription
DirectedReadOptions.Builder
Overrides

getDefaultInstanceForType()

public DirectedReadOptions getDefaultInstanceForType()
Returns
TypeDescription
DirectedReadOptions

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

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;

Returns
TypeDescription
DirectedReadOptions.ExcludeReplicas

The excludeReplicas.

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;

Returns
TypeDescription
DirectedReadOptions.ExcludeReplicas.Builder

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;

Returns
TypeDescription
DirectedReadOptions.ExcludeReplicasOrBuilder

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;

Returns
TypeDescription
DirectedReadOptions.IncludeReplicas

The includeReplicas.

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;

Returns
TypeDescription
DirectedReadOptions.IncludeReplicas.Builder

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;

Returns
TypeDescription
DirectedReadOptions.IncludeReplicasOrBuilder

getReplicasCase()

public DirectedReadOptions.ReplicasCase getReplicasCase()
Returns
TypeDescription
DirectedReadOptions.ReplicasCase

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;

Returns
TypeDescription
boolean

Whether the excludeReplicas field is set.

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;

Returns
TypeDescription
boolean

Whether the includeReplicas field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeExcludeReplicas(DirectedReadOptions.ExcludeReplicas value)

public DirectedReadOptions.Builder mergeExcludeReplicas(DirectedReadOptions.ExcludeReplicas value)

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;

Parameter
NameDescription
valueDirectedReadOptions.ExcludeReplicas
Returns
TypeDescription
DirectedReadOptions.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public DirectedReadOptions.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DirectedReadOptions.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public DirectedReadOptions.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
DirectedReadOptions.Builder
Overrides

mergeFrom(DirectedReadOptions other)

public DirectedReadOptions.Builder mergeFrom(DirectedReadOptions other)
Parameter
NameDescription
otherDirectedReadOptions
Returns
TypeDescription
DirectedReadOptions.Builder

mergeIncludeReplicas(DirectedReadOptions.IncludeReplicas value)

public DirectedReadOptions.Builder mergeIncludeReplicas(DirectedReadOptions.IncludeReplicas value)

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;

Parameter
NameDescription
valueDirectedReadOptions.IncludeReplicas
Returns
TypeDescription
DirectedReadOptions.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final DirectedReadOptions.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
DirectedReadOptions.Builder
Overrides

setExcludeReplicas(DirectedReadOptions.ExcludeReplicas value)

public DirectedReadOptions.Builder setExcludeReplicas(DirectedReadOptions.ExcludeReplicas value)

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;

Parameter
NameDescription
valueDirectedReadOptions.ExcludeReplicas
Returns
TypeDescription
DirectedReadOptions.Builder

setExcludeReplicas(DirectedReadOptions.ExcludeReplicas.Builder builderForValue)

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;

Parameter
NameDescription
builderForValueDirectedReadOptions.ExcludeReplicas.Builder
Returns
TypeDescription
DirectedReadOptions.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public DirectedReadOptions.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
DirectedReadOptions.Builder
Overrides

setIncludeReplicas(DirectedReadOptions.IncludeReplicas value)

public DirectedReadOptions.Builder setIncludeReplicas(DirectedReadOptions.IncludeReplicas value)

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;

Parameter
NameDescription
valueDirectedReadOptions.IncludeReplicas
Returns
TypeDescription
DirectedReadOptions.Builder

setIncludeReplicas(DirectedReadOptions.IncludeReplicas.Builder builderForValue)

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;

Parameter
NameDescription
builderForValueDirectedReadOptions.IncludeReplicas.Builder
Returns
TypeDescription
DirectedReadOptions.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public DirectedReadOptions.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
DirectedReadOptions.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final DirectedReadOptions.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
DirectedReadOptions.Builder
Overrides