Class DirectedReadOptions.Builder (6.82.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
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public DirectedReadOptions.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
DirectedReadOptions.Builder
Overrides

build()

public DirectedReadOptions build()
Returns
Type Description
DirectedReadOptions

buildPartial()

public DirectedReadOptions buildPartial()
Returns
Type Description
DirectedReadOptions

clear()

public DirectedReadOptions.Builder clear()
Returns
Type Description
DirectedReadOptions.Builder
Overrides

clearExcludeReplicas()

public DirectedReadOptions.Builder clearExcludeReplicas()

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;

Returns
Type Description
DirectedReadOptions.Builder

clearField(Descriptors.FieldDescriptor field)

public DirectedReadOptions.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
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
Type Description
DirectedReadOptions.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public DirectedReadOptions.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
DirectedReadOptions.Builder
Overrides

clearReplicas()

public DirectedReadOptions.Builder clearReplicas()
Returns
Type Description
DirectedReadOptions.Builder

clone()

public DirectedReadOptions.Builder clone()
Returns
Type Description
DirectedReadOptions.Builder
Overrides

getDefaultInstanceForType()

public DirectedReadOptions getDefaultInstanceForType()
Returns
Type Description
DirectedReadOptions

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

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;

Returns
Type Description
DirectedReadOptions.ExcludeReplicas

The excludeReplicas.

getExcludeReplicasBuilder()

public DirectedReadOptions.ExcludeReplicas.Builder getExcludeReplicasBuilder()

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;

Returns
Type Description
DirectedReadOptions.ExcludeReplicas.Builder

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;

Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
DirectedReadOptions.IncludeReplicasOrBuilder

getReplicasCase()

public DirectedReadOptions.ReplicasCase getReplicasCase()
Returns
Type Description
DirectedReadOptions.ReplicasCase

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;

Returns
Type Description
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
Type Description
boolean

Whether the includeReplicas field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeExcludeReplicas(DirectedReadOptions.ExcludeReplicas value)

public DirectedReadOptions.Builder mergeExcludeReplicas(DirectedReadOptions.ExcludeReplicas value)

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;

Parameter
Name Description
value DirectedReadOptions.ExcludeReplicas
Returns
Type Description
DirectedReadOptions.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public DirectedReadOptions.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DirectedReadOptions.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public DirectedReadOptions.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
DirectedReadOptions.Builder
Overrides

mergeFrom(DirectedReadOptions other)

public DirectedReadOptions.Builder mergeFrom(DirectedReadOptions other)
Parameter
Name Description
other DirectedReadOptions
Returns
Type Description
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
Name Description
value DirectedReadOptions.IncludeReplicas
Returns
Type Description
DirectedReadOptions.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final DirectedReadOptions.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
DirectedReadOptions.Builder
Overrides

setExcludeReplicas(DirectedReadOptions.ExcludeReplicas value)

public DirectedReadOptions.Builder setExcludeReplicas(DirectedReadOptions.ExcludeReplicas value)

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;

Parameter
Name Description
value DirectedReadOptions.ExcludeReplicas
Returns
Type Description
DirectedReadOptions.Builder

setExcludeReplicas(DirectedReadOptions.ExcludeReplicas.Builder builderForValue)

public DirectedReadOptions.Builder setExcludeReplicas(DirectedReadOptions.ExcludeReplicas.Builder builderForValue)

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;

Parameter
Name Description
builderForValue DirectedReadOptions.ExcludeReplicas.Builder
Returns
Type Description
DirectedReadOptions.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public DirectedReadOptions.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
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
Name Description
value DirectedReadOptions.IncludeReplicas
Returns
Type Description
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
Name Description
builderForValue DirectedReadOptions.IncludeReplicas.Builder
Returns
Type Description
DirectedReadOptions.Builder

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

public DirectedReadOptions.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
DirectedReadOptions.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final DirectedReadOptions.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
DirectedReadOptions.Builder
Overrides