public static final class WeightedCluster.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<WeightedCluster.Builder> implements WeightedClusterOrBuilder
Compared to the :ref:`cluster <envoy_api_field_route.RouteAction.cluster>` field that specifies a single upstream cluster as the target of a request, the :ref:`weighted_clusters <envoy_api_field_route.RouteAction.weighted_clusters>` option allows for specification of multiple upstream clusters along with weights that indicate the percentage of traffic to be forwarded to each cluster. The router selects an upstream cluster based on the weights.Protobuf type
envoy.api.v2.route.WeightedCluster| Modifier and Type | Method and Description |
|---|---|
WeightedCluster.Builder |
addAllClusters(Iterable<? extends WeightedCluster.ClusterWeight> values)
Specifies one or more upstream clusters associated with the route.
|
WeightedCluster.Builder |
addClusters(int index,
WeightedCluster.ClusterWeight.Builder builderForValue)
Specifies one or more upstream clusters associated with the route.
|
WeightedCluster.Builder |
addClusters(int index,
WeightedCluster.ClusterWeight value)
Specifies one or more upstream clusters associated with the route.
|
WeightedCluster.Builder |
addClusters(WeightedCluster.ClusterWeight.Builder builderForValue)
Specifies one or more upstream clusters associated with the route.
|
WeightedCluster.Builder |
addClusters(WeightedCluster.ClusterWeight value)
Specifies one or more upstream clusters associated with the route.
|
WeightedCluster.ClusterWeight.Builder |
addClustersBuilder()
Specifies one or more upstream clusters associated with the route.
|
WeightedCluster.ClusterWeight.Builder |
addClustersBuilder(int index)
Specifies one or more upstream clusters associated with the route.
|
WeightedCluster.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
WeightedCluster |
build() |
WeightedCluster |
buildPartial() |
WeightedCluster.Builder |
clear() |
WeightedCluster.Builder |
clearClusters()
Specifies one or more upstream clusters associated with the route.
|
WeightedCluster.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
WeightedCluster.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
WeightedCluster.Builder |
clearRuntimeKeyPrefix()
Specifies the runtime key prefix that should be used to construct the
runtime keys associated with each cluster.
|
WeightedCluster.Builder |
clearTotalWeight()
Specifies the total weight across all clusters.
|
WeightedCluster.Builder |
clone() |
WeightedCluster.ClusterWeight |
getClusters(int index)
Specifies one or more upstream clusters associated with the route.
|
WeightedCluster.ClusterWeight.Builder |
getClustersBuilder(int index)
Specifies one or more upstream clusters associated with the route.
|
List<WeightedCluster.ClusterWeight.Builder> |
getClustersBuilderList()
Specifies one or more upstream clusters associated with the route.
|
int |
getClustersCount()
Specifies one or more upstream clusters associated with the route.
|
List<WeightedCluster.ClusterWeight> |
getClustersList()
Specifies one or more upstream clusters associated with the route.
|
WeightedCluster.ClusterWeightOrBuilder |
getClustersOrBuilder(int index)
Specifies one or more upstream clusters associated with the route.
|
List<? extends WeightedCluster.ClusterWeightOrBuilder> |
getClustersOrBuilderList()
Specifies one or more upstream clusters associated with the route.
|
WeightedCluster |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
String |
getRuntimeKeyPrefix()
Specifies the runtime key prefix that should be used to construct the
runtime keys associated with each cluster.
|
com.google.protobuf.ByteString |
getRuntimeKeyPrefixBytes()
Specifies the runtime key prefix that should be used to construct the
runtime keys associated with each cluster.
|
com.google.protobuf.UInt32Value |
getTotalWeight()
Specifies the total weight across all clusters.
|
com.google.protobuf.UInt32Value.Builder |
getTotalWeightBuilder()
Specifies the total weight across all clusters.
|
com.google.protobuf.UInt32ValueOrBuilder |
getTotalWeightOrBuilder()
Specifies the total weight across all clusters.
|
boolean |
hasTotalWeight()
Specifies the total weight across all clusters.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
WeightedCluster.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
WeightedCluster.Builder |
mergeFrom(com.google.protobuf.Message other) |
WeightedCluster.Builder |
mergeFrom(WeightedCluster other) |
WeightedCluster.Builder |
mergeTotalWeight(com.google.protobuf.UInt32Value value)
Specifies the total weight across all clusters.
|
WeightedCluster.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
WeightedCluster.Builder |
removeClusters(int index)
Specifies one or more upstream clusters associated with the route.
|
WeightedCluster.Builder |
setClusters(int index,
WeightedCluster.ClusterWeight.Builder builderForValue)
Specifies one or more upstream clusters associated with the route.
|
WeightedCluster.Builder |
setClusters(int index,
WeightedCluster.ClusterWeight value)
Specifies one or more upstream clusters associated with the route.
|
WeightedCluster.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
WeightedCluster.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
WeightedCluster.Builder |
setRuntimeKeyPrefix(String value)
Specifies the runtime key prefix that should be used to construct the
runtime keys associated with each cluster.
|
WeightedCluster.Builder |
setRuntimeKeyPrefixBytes(com.google.protobuf.ByteString value)
Specifies the runtime key prefix that should be used to construct the
runtime keys associated with each cluster.
|
WeightedCluster.Builder |
setTotalWeight(com.google.protobuf.UInt32Value.Builder builderForValue)
Specifies the total weight across all clusters.
|
WeightedCluster.Builder |
setTotalWeight(com.google.protobuf.UInt32Value value)
Specifies the total weight across all clusters.
|
WeightedCluster.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<WeightedCluster.Builder>public WeightedCluster.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<WeightedCluster.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<WeightedCluster.Builder>public WeightedCluster getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic WeightedCluster build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic WeightedCluster buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic WeightedCluster.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<WeightedCluster.Builder>public WeightedCluster.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<WeightedCluster.Builder>public WeightedCluster.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<WeightedCluster.Builder>public WeightedCluster.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<WeightedCluster.Builder>public WeightedCluster.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<WeightedCluster.Builder>public WeightedCluster.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<WeightedCluster.Builder>public WeightedCluster.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<WeightedCluster.Builder>public WeightedCluster.Builder mergeFrom(WeightedCluster other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<WeightedCluster.Builder>public WeightedCluster.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<WeightedCluster.Builder>IOExceptionpublic List<WeightedCluster.ClusterWeight> getClustersList()
Specifies one or more upstream clusters associated with the route.
repeated .envoy.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }getClustersList in interface WeightedClusterOrBuilderpublic int getClustersCount()
Specifies one or more upstream clusters associated with the route.
repeated .envoy.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }getClustersCount in interface WeightedClusterOrBuilderpublic WeightedCluster.ClusterWeight getClusters(int index)
Specifies one or more upstream clusters associated with the route.
repeated .envoy.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }getClusters in interface WeightedClusterOrBuilderpublic WeightedCluster.Builder setClusters(int index, WeightedCluster.ClusterWeight value)
Specifies one or more upstream clusters associated with the route.
repeated .envoy.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }public WeightedCluster.Builder setClusters(int index, WeightedCluster.ClusterWeight.Builder builderForValue)
Specifies one or more upstream clusters associated with the route.
repeated .envoy.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }public WeightedCluster.Builder addClusters(WeightedCluster.ClusterWeight value)
Specifies one or more upstream clusters associated with the route.
repeated .envoy.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }public WeightedCluster.Builder addClusters(int index, WeightedCluster.ClusterWeight value)
Specifies one or more upstream clusters associated with the route.
repeated .envoy.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }public WeightedCluster.Builder addClusters(WeightedCluster.ClusterWeight.Builder builderForValue)
Specifies one or more upstream clusters associated with the route.
repeated .envoy.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }public WeightedCluster.Builder addClusters(int index, WeightedCluster.ClusterWeight.Builder builderForValue)
Specifies one or more upstream clusters associated with the route.
repeated .envoy.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }public WeightedCluster.Builder addAllClusters(Iterable<? extends WeightedCluster.ClusterWeight> values)
Specifies one or more upstream clusters associated with the route.
repeated .envoy.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }public WeightedCluster.Builder clearClusters()
Specifies one or more upstream clusters associated with the route.
repeated .envoy.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }public WeightedCluster.Builder removeClusters(int index)
Specifies one or more upstream clusters associated with the route.
repeated .envoy.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }public WeightedCluster.ClusterWeight.Builder getClustersBuilder(int index)
Specifies one or more upstream clusters associated with the route.
repeated .envoy.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }public WeightedCluster.ClusterWeightOrBuilder getClustersOrBuilder(int index)
Specifies one or more upstream clusters associated with the route.
repeated .envoy.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }getClustersOrBuilder in interface WeightedClusterOrBuilderpublic List<? extends WeightedCluster.ClusterWeightOrBuilder> getClustersOrBuilderList()
Specifies one or more upstream clusters associated with the route.
repeated .envoy.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }getClustersOrBuilderList in interface WeightedClusterOrBuilderpublic WeightedCluster.ClusterWeight.Builder addClustersBuilder()
Specifies one or more upstream clusters associated with the route.
repeated .envoy.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }public WeightedCluster.ClusterWeight.Builder addClustersBuilder(int index)
Specifies one or more upstream clusters associated with the route.
repeated .envoy.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }public List<WeightedCluster.ClusterWeight.Builder> getClustersBuilderList()
Specifies one or more upstream clusters associated with the route.
repeated .envoy.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }public boolean hasTotalWeight()
Specifies the total weight across all clusters. The sum of all cluster weights must equal this value, which must be greater than 0. Defaults to 100.
.google.protobuf.UInt32Value total_weight = 3 [(.validate.rules) = { ... }hasTotalWeight in interface WeightedClusterOrBuilderpublic com.google.protobuf.UInt32Value getTotalWeight()
Specifies the total weight across all clusters. The sum of all cluster weights must equal this value, which must be greater than 0. Defaults to 100.
.google.protobuf.UInt32Value total_weight = 3 [(.validate.rules) = { ... }getTotalWeight in interface WeightedClusterOrBuilderpublic WeightedCluster.Builder setTotalWeight(com.google.protobuf.UInt32Value value)
Specifies the total weight across all clusters. The sum of all cluster weights must equal this value, which must be greater than 0. Defaults to 100.
.google.protobuf.UInt32Value total_weight = 3 [(.validate.rules) = { ... }public WeightedCluster.Builder setTotalWeight(com.google.protobuf.UInt32Value.Builder builderForValue)
Specifies the total weight across all clusters. The sum of all cluster weights must equal this value, which must be greater than 0. Defaults to 100.
.google.protobuf.UInt32Value total_weight = 3 [(.validate.rules) = { ... }public WeightedCluster.Builder mergeTotalWeight(com.google.protobuf.UInt32Value value)
Specifies the total weight across all clusters. The sum of all cluster weights must equal this value, which must be greater than 0. Defaults to 100.
.google.protobuf.UInt32Value total_weight = 3 [(.validate.rules) = { ... }public WeightedCluster.Builder clearTotalWeight()
Specifies the total weight across all clusters. The sum of all cluster weights must equal this value, which must be greater than 0. Defaults to 100.
.google.protobuf.UInt32Value total_weight = 3 [(.validate.rules) = { ... }public com.google.protobuf.UInt32Value.Builder getTotalWeightBuilder()
Specifies the total weight across all clusters. The sum of all cluster weights must equal this value, which must be greater than 0. Defaults to 100.
.google.protobuf.UInt32Value total_weight = 3 [(.validate.rules) = { ... }public com.google.protobuf.UInt32ValueOrBuilder getTotalWeightOrBuilder()
Specifies the total weight across all clusters. The sum of all cluster weights must equal this value, which must be greater than 0. Defaults to 100.
.google.protobuf.UInt32Value total_weight = 3 [(.validate.rules) = { ... }getTotalWeightOrBuilder in interface WeightedClusterOrBuilderpublic String getRuntimeKeyPrefix()
Specifies the runtime key prefix that should be used to construct the runtime keys associated with each cluster. When the *runtime_key_prefix* is specified, the router will look for weights associated with each upstream cluster under the key *runtime_key_prefix* + "." + *cluster[i].name* where *cluster[i]* denotes an entry in the clusters array field. If the runtime key for the cluster does not exist, the value specified in the configuration file will be used as the default weight. See the :ref:`runtime documentation <operations_runtime>` for how key names map to the underlying implementation.
string runtime_key_prefix = 2;getRuntimeKeyPrefix in interface WeightedClusterOrBuilderpublic com.google.protobuf.ByteString getRuntimeKeyPrefixBytes()
Specifies the runtime key prefix that should be used to construct the runtime keys associated with each cluster. When the *runtime_key_prefix* is specified, the router will look for weights associated with each upstream cluster under the key *runtime_key_prefix* + "." + *cluster[i].name* where *cluster[i]* denotes an entry in the clusters array field. If the runtime key for the cluster does not exist, the value specified in the configuration file will be used as the default weight. See the :ref:`runtime documentation <operations_runtime>` for how key names map to the underlying implementation.
string runtime_key_prefix = 2;getRuntimeKeyPrefixBytes in interface WeightedClusterOrBuilderpublic WeightedCluster.Builder setRuntimeKeyPrefix(String value)
Specifies the runtime key prefix that should be used to construct the runtime keys associated with each cluster. When the *runtime_key_prefix* is specified, the router will look for weights associated with each upstream cluster under the key *runtime_key_prefix* + "." + *cluster[i].name* where *cluster[i]* denotes an entry in the clusters array field. If the runtime key for the cluster does not exist, the value specified in the configuration file will be used as the default weight. See the :ref:`runtime documentation <operations_runtime>` for how key names map to the underlying implementation.
string runtime_key_prefix = 2;public WeightedCluster.Builder clearRuntimeKeyPrefix()
Specifies the runtime key prefix that should be used to construct the runtime keys associated with each cluster. When the *runtime_key_prefix* is specified, the router will look for weights associated with each upstream cluster under the key *runtime_key_prefix* + "." + *cluster[i].name* where *cluster[i]* denotes an entry in the clusters array field. If the runtime key for the cluster does not exist, the value specified in the configuration file will be used as the default weight. See the :ref:`runtime documentation <operations_runtime>` for how key names map to the underlying implementation.
string runtime_key_prefix = 2;public WeightedCluster.Builder setRuntimeKeyPrefixBytes(com.google.protobuf.ByteString value)
Specifies the runtime key prefix that should be used to construct the runtime keys associated with each cluster. When the *runtime_key_prefix* is specified, the router will look for weights associated with each upstream cluster under the key *runtime_key_prefix* + "." + *cluster[i].name* where *cluster[i]* denotes an entry in the clusters array field. If the runtime key for the cluster does not exist, the value specified in the configuration file will be used as the default weight. See the :ref:`runtime documentation <operations_runtime>` for how key names map to the underlying implementation.
string runtime_key_prefix = 2;public final WeightedCluster.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<WeightedCluster.Builder>public final WeightedCluster.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<WeightedCluster.Builder>Copyright © 2018–2021 The Envoy Project. All rights reserved.