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
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public DirectedReadOptions.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
public DirectedReadOptions build()
buildPartial()
public DirectedReadOptions buildPartial()
clear()
public DirectedReadOptions.Builder clear()
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;
clearField(Descriptors.FieldDescriptor field)
public DirectedReadOptions.Builder clearField(Descriptors.FieldDescriptor field)
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;
clearOneof(Descriptors.OneofDescriptor oneof)
public DirectedReadOptions.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clearReplicas()
public DirectedReadOptions.Builder clearReplicas()
clone()
public DirectedReadOptions.Builder clone()
Overrides
getDefaultInstanceForType()
public DirectedReadOptions getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
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;
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;
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;
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;
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;
getReplicasCase()
public DirectedReadOptions.ReplicasCase getReplicasCase()
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()
Overrides
isInitialized()
public final boolean isInitialized()
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;
public DirectedReadOptions.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public DirectedReadOptions.Builder mergeFrom(Message other)
Parameter |
---|
Name | Description |
other | Message
|
Overrides
mergeFrom(DirectedReadOptions other)
public DirectedReadOptions.Builder mergeFrom(DirectedReadOptions other)
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;
mergeUnknownFields(UnknownFieldSet unknownFields)
public final DirectedReadOptions.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
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;
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;
setField(Descriptors.FieldDescriptor field, Object value)
public DirectedReadOptions.Builder setField(Descriptors.FieldDescriptor field, Object value)
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;
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;
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public DirectedReadOptions.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final DirectedReadOptions.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides