Class DirectedReadOptions.IncludeReplicas.Builder (6.58.0)

public static final class DirectedReadOptions.IncludeReplicas.Builder extends GeneratedMessageV3.Builder<DirectedReadOptions.IncludeReplicas.Builder> implements DirectedReadOptions.IncludeReplicasOrBuilder

An IncludeReplicas contains a repeated set of ReplicaSelection which indicates the order in which replicas should be considered.

Protobuf type google.spanner.v1.DirectedReadOptions.IncludeReplicas

Static Methods

getDescriptor()

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

Methods

addAllReplicaSelections(Iterable<? extends DirectedReadOptions.ReplicaSelection> values)

public DirectedReadOptions.IncludeReplicas.Builder addAllReplicaSelections(Iterable<? extends DirectedReadOptions.ReplicaSelection> values)

The directed read replica selector.

repeated .google.spanner.v1.DirectedReadOptions.ReplicaSelection replica_selections = 1;

Parameter
NameDescription
valuesIterable<? extends com.google.spanner.v1.DirectedReadOptions.ReplicaSelection>
Returns
TypeDescription
DirectedReadOptions.IncludeReplicas.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addReplicaSelections(DirectedReadOptions.ReplicaSelection value)

public DirectedReadOptions.IncludeReplicas.Builder addReplicaSelections(DirectedReadOptions.ReplicaSelection value)

The directed read replica selector.

repeated .google.spanner.v1.DirectedReadOptions.ReplicaSelection replica_selections = 1;

Parameter
NameDescription
valueDirectedReadOptions.ReplicaSelection
Returns
TypeDescription
DirectedReadOptions.IncludeReplicas.Builder

addReplicaSelections(DirectedReadOptions.ReplicaSelection.Builder builderForValue)

public DirectedReadOptions.IncludeReplicas.Builder addReplicaSelections(DirectedReadOptions.ReplicaSelection.Builder builderForValue)

The directed read replica selector.

repeated .google.spanner.v1.DirectedReadOptions.ReplicaSelection replica_selections = 1;

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

addReplicaSelections(int index, DirectedReadOptions.ReplicaSelection value)

public DirectedReadOptions.IncludeReplicas.Builder addReplicaSelections(int index, DirectedReadOptions.ReplicaSelection value)

The directed read replica selector.

repeated .google.spanner.v1.DirectedReadOptions.ReplicaSelection replica_selections = 1;

Parameters
NameDescription
indexint
valueDirectedReadOptions.ReplicaSelection
Returns
TypeDescription
DirectedReadOptions.IncludeReplicas.Builder

addReplicaSelections(int index, DirectedReadOptions.ReplicaSelection.Builder builderForValue)

public DirectedReadOptions.IncludeReplicas.Builder addReplicaSelections(int index, DirectedReadOptions.ReplicaSelection.Builder builderForValue)

The directed read replica selector.

repeated .google.spanner.v1.DirectedReadOptions.ReplicaSelection replica_selections = 1;

Parameters
NameDescription
indexint
builderForValueDirectedReadOptions.ReplicaSelection.Builder
Returns
TypeDescription
DirectedReadOptions.IncludeReplicas.Builder

addReplicaSelectionsBuilder()

public DirectedReadOptions.ReplicaSelection.Builder addReplicaSelectionsBuilder()

The directed read replica selector.

repeated .google.spanner.v1.DirectedReadOptions.ReplicaSelection replica_selections = 1;

Returns
TypeDescription
DirectedReadOptions.ReplicaSelection.Builder

addReplicaSelectionsBuilder(int index)

public DirectedReadOptions.ReplicaSelection.Builder addReplicaSelectionsBuilder(int index)

The directed read replica selector.

repeated .google.spanner.v1.DirectedReadOptions.ReplicaSelection replica_selections = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
DirectedReadOptions.ReplicaSelection.Builder

build()

public DirectedReadOptions.IncludeReplicas build()
Returns
TypeDescription
DirectedReadOptions.IncludeReplicas

buildPartial()

public DirectedReadOptions.IncludeReplicas buildPartial()
Returns
TypeDescription
DirectedReadOptions.IncludeReplicas

clear()

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

clearAutoFailoverDisabled()

public DirectedReadOptions.IncludeReplicas.Builder clearAutoFailoverDisabled()

If true, Spanner will not route requests to a replica outside the include_replicas list when all of the specified replicas are unavailable or unhealthy. Default value is false.

bool auto_failover_disabled = 2;

Returns
TypeDescription
DirectedReadOptions.IncludeReplicas.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearReplicaSelections()

public DirectedReadOptions.IncludeReplicas.Builder clearReplicaSelections()

The directed read replica selector.

repeated .google.spanner.v1.DirectedReadOptions.ReplicaSelection replica_selections = 1;

Returns
TypeDescription
DirectedReadOptions.IncludeReplicas.Builder

clone()

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

getAutoFailoverDisabled()

public boolean getAutoFailoverDisabled()

If true, Spanner will not route requests to a replica outside the include_replicas list when all of the specified replicas are unavailable or unhealthy. Default value is false.

bool auto_failover_disabled = 2;

Returns
TypeDescription
boolean

The autoFailoverDisabled.

getDefaultInstanceForType()

public DirectedReadOptions.IncludeReplicas getDefaultInstanceForType()
Returns
TypeDescription
DirectedReadOptions.IncludeReplicas

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getReplicaSelections(int index)

public DirectedReadOptions.ReplicaSelection getReplicaSelections(int index)

The directed read replica selector.

repeated .google.spanner.v1.DirectedReadOptions.ReplicaSelection replica_selections = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
DirectedReadOptions.ReplicaSelection

getReplicaSelectionsBuilder(int index)

public DirectedReadOptions.ReplicaSelection.Builder getReplicaSelectionsBuilder(int index)

The directed read replica selector.

repeated .google.spanner.v1.DirectedReadOptions.ReplicaSelection replica_selections = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
DirectedReadOptions.ReplicaSelection.Builder

getReplicaSelectionsBuilderList()

public List<DirectedReadOptions.ReplicaSelection.Builder> getReplicaSelectionsBuilderList()

The directed read replica selector.

repeated .google.spanner.v1.DirectedReadOptions.ReplicaSelection replica_selections = 1;

Returns
TypeDescription
List<Builder>

getReplicaSelectionsCount()

public int getReplicaSelectionsCount()

The directed read replica selector.

repeated .google.spanner.v1.DirectedReadOptions.ReplicaSelection replica_selections = 1;

Returns
TypeDescription
int

getReplicaSelectionsList()

public List<DirectedReadOptions.ReplicaSelection> getReplicaSelectionsList()

The directed read replica selector.

repeated .google.spanner.v1.DirectedReadOptions.ReplicaSelection replica_selections = 1;

Returns
TypeDescription
List<ReplicaSelection>

getReplicaSelectionsOrBuilder(int index)

public DirectedReadOptions.ReplicaSelectionOrBuilder getReplicaSelectionsOrBuilder(int index)

The directed read replica selector.

repeated .google.spanner.v1.DirectedReadOptions.ReplicaSelection replica_selections = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
DirectedReadOptions.ReplicaSelectionOrBuilder

getReplicaSelectionsOrBuilderList()

public List<? extends DirectedReadOptions.ReplicaSelectionOrBuilder> getReplicaSelectionsOrBuilderList()

The directed read replica selector.

repeated .google.spanner.v1.DirectedReadOptions.ReplicaSelection replica_selections = 1;

Returns
TypeDescription
List<? extends com.google.spanner.v1.DirectedReadOptions.ReplicaSelectionOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(DirectedReadOptions.IncludeReplicas other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeReplicaSelections(int index)

public DirectedReadOptions.IncludeReplicas.Builder removeReplicaSelections(int index)

The directed read replica selector.

repeated .google.spanner.v1.DirectedReadOptions.ReplicaSelection replica_selections = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
DirectedReadOptions.IncludeReplicas.Builder

setAutoFailoverDisabled(boolean value)

public DirectedReadOptions.IncludeReplicas.Builder setAutoFailoverDisabled(boolean value)

If true, Spanner will not route requests to a replica outside the include_replicas list when all of the specified replicas are unavailable or unhealthy. Default value is false.

bool auto_failover_disabled = 2;

Parameter
NameDescription
valueboolean

The autoFailoverDisabled to set.

Returns
TypeDescription
DirectedReadOptions.IncludeReplicas.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setReplicaSelections(int index, DirectedReadOptions.ReplicaSelection value)

public DirectedReadOptions.IncludeReplicas.Builder setReplicaSelections(int index, DirectedReadOptions.ReplicaSelection value)

The directed read replica selector.

repeated .google.spanner.v1.DirectedReadOptions.ReplicaSelection replica_selections = 1;

Parameters
NameDescription
indexint
valueDirectedReadOptions.ReplicaSelection
Returns
TypeDescription
DirectedReadOptions.IncludeReplicas.Builder

setReplicaSelections(int index, DirectedReadOptions.ReplicaSelection.Builder builderForValue)

public DirectedReadOptions.IncludeReplicas.Builder setReplicaSelections(int index, DirectedReadOptions.ReplicaSelection.Builder builderForValue)

The directed read replica selector.

repeated .google.spanner.v1.DirectedReadOptions.ReplicaSelection replica_selections = 1;

Parameters
NameDescription
indexint
builderForValueDirectedReadOptions.ReplicaSelection.Builder
Returns
TypeDescription
DirectedReadOptions.IncludeReplicas.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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