Package io.envoyproxy.envoy.api.v2
Class Cluster.LbSubsetConfig.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderType>
-
- com.google.protobuf.GeneratedMessageV3.Builder<Cluster.LbSubsetConfig.Builder>
-
- io.envoyproxy.envoy.api.v2.Cluster.LbSubsetConfig.Builder
-
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cluster.LbSubsetConfigOrBuilder,Cloneable
- Enclosing class:
- Cluster.LbSubsetConfig
public static final class Cluster.LbSubsetConfig.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Cluster.LbSubsetConfig.Builder> implements Cluster.LbSubsetConfigOrBuilder
Optionally divide the endpoints in this cluster into subsets defined by endpoint metadata and selected by route and weighted cluster metadata. [#next-free-field: 8]
Protobuf typeenvoy.api.v2.Cluster.LbSubsetConfig
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Cluster.LbSubsetConfig.BuilderaddAllSubsetSelectors(Iterable<? extends Cluster.LbSubsetConfig.LbSubsetSelector> values)For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value.Cluster.LbSubsetConfig.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)Cluster.LbSubsetConfig.BuilderaddSubsetSelectors(int index, Cluster.LbSubsetConfig.LbSubsetSelector value)For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value.Cluster.LbSubsetConfig.BuilderaddSubsetSelectors(int index, Cluster.LbSubsetConfig.LbSubsetSelector.Builder builderForValue)For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value.Cluster.LbSubsetConfig.BuilderaddSubsetSelectors(Cluster.LbSubsetConfig.LbSubsetSelector value)For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value.Cluster.LbSubsetConfig.BuilderaddSubsetSelectors(Cluster.LbSubsetConfig.LbSubsetSelector.Builder builderForValue)For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value.Cluster.LbSubsetConfig.LbSubsetSelector.BuilderaddSubsetSelectorsBuilder()For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value.Cluster.LbSubsetConfig.LbSubsetSelector.BuilderaddSubsetSelectorsBuilder(int index)For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value.Cluster.LbSubsetConfigbuild()Cluster.LbSubsetConfigbuildPartial()Cluster.LbSubsetConfig.Builderclear()Cluster.LbSubsetConfig.BuilderclearDefaultSubset()Specifies the default subset of endpoints used during fallback if fallback_policy is :ref:`DEFAULT_SUBSET<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`.Cluster.LbSubsetConfig.BuilderclearFallbackPolicy()The behavior used when no endpoint subset matches the selected route's metadata.Cluster.LbSubsetConfig.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)Cluster.LbSubsetConfig.BuilderclearListAsAny()If true, metadata specified for a metadata key will be matched against the corresponding endpoint metadata if the endpoint metadata matches the value exactly OR it is a list value and any of the elements in the list matches the criteria.Cluster.LbSubsetConfig.BuilderclearLocalityWeightAware()If true, routing to subsets will take into account the localities and locality weights of the endpoints when making the routing decision.Cluster.LbSubsetConfig.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)Cluster.LbSubsetConfig.BuilderclearPanicModeAny()If true, when a fallback policy is configured and its corresponding subset fails to find a host this will cause any host to be selected instead.Cluster.LbSubsetConfig.BuilderclearScaleLocalityWeight()When used with locality_weight_aware, scales the weight of each locality by the ratio of hosts in the subset vs hosts in the original subset.Cluster.LbSubsetConfig.BuilderclearSubsetSelectors()For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value.Cluster.LbSubsetConfig.Builderclone()Cluster.LbSubsetConfiggetDefaultInstanceForType()com.google.protobuf.StructgetDefaultSubset()Specifies the default subset of endpoints used during fallback if fallback_policy is :ref:`DEFAULT_SUBSET<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`.com.google.protobuf.Struct.BuildergetDefaultSubsetBuilder()Specifies the default subset of endpoints used during fallback if fallback_policy is :ref:`DEFAULT_SUBSET<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`.com.google.protobuf.StructOrBuildergetDefaultSubsetOrBuilder()Specifies the default subset of endpoints used during fallback if fallback_policy is :ref:`DEFAULT_SUBSET<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`.static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()Cluster.LbSubsetConfig.LbSubsetFallbackPolicygetFallbackPolicy()The behavior used when no endpoint subset matches the selected route's metadata.intgetFallbackPolicyValue()The behavior used when no endpoint subset matches the selected route's metadata.booleangetListAsAny()If true, metadata specified for a metadata key will be matched against the corresponding endpoint metadata if the endpoint metadata matches the value exactly OR it is a list value and any of the elements in the list matches the criteria.booleangetLocalityWeightAware()If true, routing to subsets will take into account the localities and locality weights of the endpoints when making the routing decision.booleangetPanicModeAny()If true, when a fallback policy is configured and its corresponding subset fails to find a host this will cause any host to be selected instead.booleangetScaleLocalityWeight()When used with locality_weight_aware, scales the weight of each locality by the ratio of hosts in the subset vs hosts in the original subset.Cluster.LbSubsetConfig.LbSubsetSelectorgetSubsetSelectors(int index)For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value.Cluster.LbSubsetConfig.LbSubsetSelector.BuildergetSubsetSelectorsBuilder(int index)For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value.List<Cluster.LbSubsetConfig.LbSubsetSelector.Builder>getSubsetSelectorsBuilderList()For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value.intgetSubsetSelectorsCount()For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value.List<Cluster.LbSubsetConfig.LbSubsetSelector>getSubsetSelectorsList()For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value.Cluster.LbSubsetConfig.LbSubsetSelectorOrBuildergetSubsetSelectorsOrBuilder(int index)For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value.List<? extends Cluster.LbSubsetConfig.LbSubsetSelectorOrBuilder>getSubsetSelectorsOrBuilderList()For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value.booleanhasDefaultSubset()Specifies the default subset of endpoints used during fallback if fallback_policy is :ref:`DEFAULT_SUBSET<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()Cluster.LbSubsetConfig.BuildermergeDefaultSubset(com.google.protobuf.Struct value)Specifies the default subset of endpoints used during fallback if fallback_policy is :ref:`DEFAULT_SUBSET<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`.Cluster.LbSubsetConfig.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)Cluster.LbSubsetConfig.BuildermergeFrom(com.google.protobuf.Message other)Cluster.LbSubsetConfig.BuildermergeFrom(Cluster.LbSubsetConfig other)Cluster.LbSubsetConfig.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)Cluster.LbSubsetConfig.BuilderremoveSubsetSelectors(int index)For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value.Cluster.LbSubsetConfig.BuildersetDefaultSubset(com.google.protobuf.Struct value)Specifies the default subset of endpoints used during fallback if fallback_policy is :ref:`DEFAULT_SUBSET<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`.Cluster.LbSubsetConfig.BuildersetDefaultSubset(com.google.protobuf.Struct.Builder builderForValue)Specifies the default subset of endpoints used during fallback if fallback_policy is :ref:`DEFAULT_SUBSET<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`.Cluster.LbSubsetConfig.BuildersetFallbackPolicy(Cluster.LbSubsetConfig.LbSubsetFallbackPolicy value)The behavior used when no endpoint subset matches the selected route's metadata.Cluster.LbSubsetConfig.BuildersetFallbackPolicyValue(int value)The behavior used when no endpoint subset matches the selected route's metadata.Cluster.LbSubsetConfig.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)Cluster.LbSubsetConfig.BuildersetListAsAny(boolean value)If true, metadata specified for a metadata key will be matched against the corresponding endpoint metadata if the endpoint metadata matches the value exactly OR it is a list value and any of the elements in the list matches the criteria.Cluster.LbSubsetConfig.BuildersetLocalityWeightAware(boolean value)If true, routing to subsets will take into account the localities and locality weights of the endpoints when making the routing decision.Cluster.LbSubsetConfig.BuildersetPanicModeAny(boolean value)If true, when a fallback policy is configured and its corresponding subset fails to find a host this will cause any host to be selected instead.Cluster.LbSubsetConfig.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)Cluster.LbSubsetConfig.BuildersetScaleLocalityWeight(boolean value)When used with locality_weight_aware, scales the weight of each locality by the ratio of hosts in the subset vs hosts in the original subset.Cluster.LbSubsetConfig.BuildersetSubsetSelectors(int index, Cluster.LbSubsetConfig.LbSubsetSelector value)For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value.Cluster.LbSubsetConfig.BuildersetSubsetSelectors(int index, Cluster.LbSubsetConfig.LbSubsetSelector.Builder builderForValue)For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value.Cluster.LbSubsetConfig.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<Cluster.LbSubsetConfig.Builder>
-
clear
public Cluster.LbSubsetConfig.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<Cluster.LbSubsetConfig.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<Cluster.LbSubsetConfig.Builder>
-
getDefaultInstanceForType
public Cluster.LbSubsetConfig getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public Cluster.LbSubsetConfig build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public Cluster.LbSubsetConfig buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public Cluster.LbSubsetConfig.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<Cluster.LbSubsetConfig.Builder>
-
setField
public Cluster.LbSubsetConfig.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Cluster.LbSubsetConfig.Builder>
-
clearField
public Cluster.LbSubsetConfig.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Cluster.LbSubsetConfig.Builder>
-
clearOneof
public Cluster.LbSubsetConfig.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<Cluster.LbSubsetConfig.Builder>
-
setRepeatedField
public Cluster.LbSubsetConfig.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Cluster.LbSubsetConfig.Builder>
-
addRepeatedField
public Cluster.LbSubsetConfig.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Cluster.LbSubsetConfig.Builder>
-
mergeFrom
public Cluster.LbSubsetConfig.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Cluster.LbSubsetConfig.Builder>
-
mergeFrom
public Cluster.LbSubsetConfig.Builder mergeFrom(Cluster.LbSubsetConfig other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<Cluster.LbSubsetConfig.Builder>
-
mergeFrom
public Cluster.LbSubsetConfig.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Cluster.LbSubsetConfig.Builder>- Throws:
IOException
-
getFallbackPolicyValue
public int getFallbackPolicyValue()
The behavior used when no endpoint subset matches the selected route's metadata. The value defaults to :ref:`NO_FALLBACK<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
.envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy fallback_policy = 1 [(.validate.rules) = { ... }- Specified by:
getFallbackPolicyValuein interfaceCluster.LbSubsetConfigOrBuilder- Returns:
- The enum numeric value on the wire for fallbackPolicy.
-
setFallbackPolicyValue
public Cluster.LbSubsetConfig.Builder setFallbackPolicyValue(int value)
The behavior used when no endpoint subset matches the selected route's metadata. The value defaults to :ref:`NO_FALLBACK<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
.envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy fallback_policy = 1 [(.validate.rules) = { ... }- Parameters:
value- The enum numeric value on the wire for fallbackPolicy to set.- Returns:
- This builder for chaining.
-
getFallbackPolicy
public Cluster.LbSubsetConfig.LbSubsetFallbackPolicy getFallbackPolicy()
The behavior used when no endpoint subset matches the selected route's metadata. The value defaults to :ref:`NO_FALLBACK<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
.envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy fallback_policy = 1 [(.validate.rules) = { ... }- Specified by:
getFallbackPolicyin interfaceCluster.LbSubsetConfigOrBuilder- Returns:
- The fallbackPolicy.
-
setFallbackPolicy
public Cluster.LbSubsetConfig.Builder setFallbackPolicy(Cluster.LbSubsetConfig.LbSubsetFallbackPolicy value)
The behavior used when no endpoint subset matches the selected route's metadata. The value defaults to :ref:`NO_FALLBACK<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
.envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy fallback_policy = 1 [(.validate.rules) = { ... }- Parameters:
value- The fallbackPolicy to set.- Returns:
- This builder for chaining.
-
clearFallbackPolicy
public Cluster.LbSubsetConfig.Builder clearFallbackPolicy()
The behavior used when no endpoint subset matches the selected route's metadata. The value defaults to :ref:`NO_FALLBACK<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
.envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy fallback_policy = 1 [(.validate.rules) = { ... }- Returns:
- This builder for chaining.
-
hasDefaultSubset
public boolean hasDefaultSubset()
Specifies the default subset of endpoints used during fallback if fallback_policy is :ref:`DEFAULT_SUBSET<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`. Each field in default_subset is compared to the matching LbEndpoint.Metadata under the *envoy.lb* namespace. It is valid for no hosts to match, in which case the behavior is the same as a fallback_policy of :ref:`NO_FALLBACK<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
.google.protobuf.Struct default_subset = 2;- Specified by:
hasDefaultSubsetin interfaceCluster.LbSubsetConfigOrBuilder- Returns:
- Whether the defaultSubset field is set.
-
getDefaultSubset
public com.google.protobuf.Struct getDefaultSubset()
Specifies the default subset of endpoints used during fallback if fallback_policy is :ref:`DEFAULT_SUBSET<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`. Each field in default_subset is compared to the matching LbEndpoint.Metadata under the *envoy.lb* namespace. It is valid for no hosts to match, in which case the behavior is the same as a fallback_policy of :ref:`NO_FALLBACK<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
.google.protobuf.Struct default_subset = 2;- Specified by:
getDefaultSubsetin interfaceCluster.LbSubsetConfigOrBuilder- Returns:
- The defaultSubset.
-
setDefaultSubset
public Cluster.LbSubsetConfig.Builder setDefaultSubset(com.google.protobuf.Struct value)
Specifies the default subset of endpoints used during fallback if fallback_policy is :ref:`DEFAULT_SUBSET<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`. Each field in default_subset is compared to the matching LbEndpoint.Metadata under the *envoy.lb* namespace. It is valid for no hosts to match, in which case the behavior is the same as a fallback_policy of :ref:`NO_FALLBACK<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
.google.protobuf.Struct default_subset = 2;
-
setDefaultSubset
public Cluster.LbSubsetConfig.Builder setDefaultSubset(com.google.protobuf.Struct.Builder builderForValue)
Specifies the default subset of endpoints used during fallback if fallback_policy is :ref:`DEFAULT_SUBSET<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`. Each field in default_subset is compared to the matching LbEndpoint.Metadata under the *envoy.lb* namespace. It is valid for no hosts to match, in which case the behavior is the same as a fallback_policy of :ref:`NO_FALLBACK<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
.google.protobuf.Struct default_subset = 2;
-
mergeDefaultSubset
public Cluster.LbSubsetConfig.Builder mergeDefaultSubset(com.google.protobuf.Struct value)
Specifies the default subset of endpoints used during fallback if fallback_policy is :ref:`DEFAULT_SUBSET<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`. Each field in default_subset is compared to the matching LbEndpoint.Metadata under the *envoy.lb* namespace. It is valid for no hosts to match, in which case the behavior is the same as a fallback_policy of :ref:`NO_FALLBACK<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
.google.protobuf.Struct default_subset = 2;
-
clearDefaultSubset
public Cluster.LbSubsetConfig.Builder clearDefaultSubset()
Specifies the default subset of endpoints used during fallback if fallback_policy is :ref:`DEFAULT_SUBSET<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`. Each field in default_subset is compared to the matching LbEndpoint.Metadata under the *envoy.lb* namespace. It is valid for no hosts to match, in which case the behavior is the same as a fallback_policy of :ref:`NO_FALLBACK<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
.google.protobuf.Struct default_subset = 2;
-
getDefaultSubsetBuilder
public com.google.protobuf.Struct.Builder getDefaultSubsetBuilder()
Specifies the default subset of endpoints used during fallback if fallback_policy is :ref:`DEFAULT_SUBSET<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`. Each field in default_subset is compared to the matching LbEndpoint.Metadata under the *envoy.lb* namespace. It is valid for no hosts to match, in which case the behavior is the same as a fallback_policy of :ref:`NO_FALLBACK<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
.google.protobuf.Struct default_subset = 2;
-
getDefaultSubsetOrBuilder
public com.google.protobuf.StructOrBuilder getDefaultSubsetOrBuilder()
Specifies the default subset of endpoints used during fallback if fallback_policy is :ref:`DEFAULT_SUBSET<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`. Each field in default_subset is compared to the matching LbEndpoint.Metadata under the *envoy.lb* namespace. It is valid for no hosts to match, in which case the behavior is the same as a fallback_policy of :ref:`NO_FALLBACK<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
.google.protobuf.Struct default_subset = 2;- Specified by:
getDefaultSubsetOrBuilderin interfaceCluster.LbSubsetConfigOrBuilder
-
getSubsetSelectorsList
public List<Cluster.LbSubsetConfig.LbSubsetSelector> getSubsetSelectorsList()
For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value. For example: .. code-block:: json { "subset_selectors": [ { "keys": [ "version" ] }, { "keys": [ "stage", "hardware_type" ] } ]} A subset is matched when the metadata from the selected route and weighted cluster contains the same keys and values as the subset's metadata. The same host may appear in multiple subsets.repeated .envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector subset_selectors = 3;- Specified by:
getSubsetSelectorsListin interfaceCluster.LbSubsetConfigOrBuilder
-
getSubsetSelectorsCount
public int getSubsetSelectorsCount()
For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value. For example: .. code-block:: json { "subset_selectors": [ { "keys": [ "version" ] }, { "keys": [ "stage", "hardware_type" ] } ]} A subset is matched when the metadata from the selected route and weighted cluster contains the same keys and values as the subset's metadata. The same host may appear in multiple subsets.repeated .envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector subset_selectors = 3;- Specified by:
getSubsetSelectorsCountin interfaceCluster.LbSubsetConfigOrBuilder
-
getSubsetSelectors
public Cluster.LbSubsetConfig.LbSubsetSelector getSubsetSelectors(int index)
For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value. For example: .. code-block:: json { "subset_selectors": [ { "keys": [ "version" ] }, { "keys": [ "stage", "hardware_type" ] } ]} A subset is matched when the metadata from the selected route and weighted cluster contains the same keys and values as the subset's metadata. The same host may appear in multiple subsets.repeated .envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector subset_selectors = 3;- Specified by:
getSubsetSelectorsin interfaceCluster.LbSubsetConfigOrBuilder
-
setSubsetSelectors
public Cluster.LbSubsetConfig.Builder setSubsetSelectors(int index, Cluster.LbSubsetConfig.LbSubsetSelector value)
For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value. For example: .. code-block:: json { "subset_selectors": [ { "keys": [ "version" ] }, { "keys": [ "stage", "hardware_type" ] } ]} A subset is matched when the metadata from the selected route and weighted cluster contains the same keys and values as the subset's metadata. The same host may appear in multiple subsets.repeated .envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector subset_selectors = 3;
-
setSubsetSelectors
public Cluster.LbSubsetConfig.Builder setSubsetSelectors(int index, Cluster.LbSubsetConfig.LbSubsetSelector.Builder builderForValue)
For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value. For example: .. code-block:: json { "subset_selectors": [ { "keys": [ "version" ] }, { "keys": [ "stage", "hardware_type" ] } ]} A subset is matched when the metadata from the selected route and weighted cluster contains the same keys and values as the subset's metadata. The same host may appear in multiple subsets.repeated .envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector subset_selectors = 3;
-
addSubsetSelectors
public Cluster.LbSubsetConfig.Builder addSubsetSelectors(Cluster.LbSubsetConfig.LbSubsetSelector value)
For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value. For example: .. code-block:: json { "subset_selectors": [ { "keys": [ "version" ] }, { "keys": [ "stage", "hardware_type" ] } ]} A subset is matched when the metadata from the selected route and weighted cluster contains the same keys and values as the subset's metadata. The same host may appear in multiple subsets.repeated .envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector subset_selectors = 3;
-
addSubsetSelectors
public Cluster.LbSubsetConfig.Builder addSubsetSelectors(int index, Cluster.LbSubsetConfig.LbSubsetSelector value)
For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value. For example: .. code-block:: json { "subset_selectors": [ { "keys": [ "version" ] }, { "keys": [ "stage", "hardware_type" ] } ]} A subset is matched when the metadata from the selected route and weighted cluster contains the same keys and values as the subset's metadata. The same host may appear in multiple subsets.repeated .envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector subset_selectors = 3;
-
addSubsetSelectors
public Cluster.LbSubsetConfig.Builder addSubsetSelectors(Cluster.LbSubsetConfig.LbSubsetSelector.Builder builderForValue)
For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value. For example: .. code-block:: json { "subset_selectors": [ { "keys": [ "version" ] }, { "keys": [ "stage", "hardware_type" ] } ]} A subset is matched when the metadata from the selected route and weighted cluster contains the same keys and values as the subset's metadata. The same host may appear in multiple subsets.repeated .envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector subset_selectors = 3;
-
addSubsetSelectors
public Cluster.LbSubsetConfig.Builder addSubsetSelectors(int index, Cluster.LbSubsetConfig.LbSubsetSelector.Builder builderForValue)
For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value. For example: .. code-block:: json { "subset_selectors": [ { "keys": [ "version" ] }, { "keys": [ "stage", "hardware_type" ] } ]} A subset is matched when the metadata from the selected route and weighted cluster contains the same keys and values as the subset's metadata. The same host may appear in multiple subsets.repeated .envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector subset_selectors = 3;
-
addAllSubsetSelectors
public Cluster.LbSubsetConfig.Builder addAllSubsetSelectors(Iterable<? extends Cluster.LbSubsetConfig.LbSubsetSelector> values)
For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value. For example: .. code-block:: json { "subset_selectors": [ { "keys": [ "version" ] }, { "keys": [ "stage", "hardware_type" ] } ]} A subset is matched when the metadata from the selected route and weighted cluster contains the same keys and values as the subset's metadata. The same host may appear in multiple subsets.repeated .envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector subset_selectors = 3;
-
clearSubsetSelectors
public Cluster.LbSubsetConfig.Builder clearSubsetSelectors()
For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value. For example: .. code-block:: json { "subset_selectors": [ { "keys": [ "version" ] }, { "keys": [ "stage", "hardware_type" ] } ]} A subset is matched when the metadata from the selected route and weighted cluster contains the same keys and values as the subset's metadata. The same host may appear in multiple subsets.repeated .envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector subset_selectors = 3;
-
removeSubsetSelectors
public Cluster.LbSubsetConfig.Builder removeSubsetSelectors(int index)
For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value. For example: .. code-block:: json { "subset_selectors": [ { "keys": [ "version" ] }, { "keys": [ "stage", "hardware_type" ] } ]} A subset is matched when the metadata from the selected route and weighted cluster contains the same keys and values as the subset's metadata. The same host may appear in multiple subsets.repeated .envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector subset_selectors = 3;
-
getSubsetSelectorsBuilder
public Cluster.LbSubsetConfig.LbSubsetSelector.Builder getSubsetSelectorsBuilder(int index)
For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value. For example: .. code-block:: json { "subset_selectors": [ { "keys": [ "version" ] }, { "keys": [ "stage", "hardware_type" ] } ]} A subset is matched when the metadata from the selected route and weighted cluster contains the same keys and values as the subset's metadata. The same host may appear in multiple subsets.repeated .envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector subset_selectors = 3;
-
getSubsetSelectorsOrBuilder
public Cluster.LbSubsetConfig.LbSubsetSelectorOrBuilder getSubsetSelectorsOrBuilder(int index)
For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value. For example: .. code-block:: json { "subset_selectors": [ { "keys": [ "version" ] }, { "keys": [ "stage", "hardware_type" ] } ]} A subset is matched when the metadata from the selected route and weighted cluster contains the same keys and values as the subset's metadata. The same host may appear in multiple subsets.repeated .envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector subset_selectors = 3;- Specified by:
getSubsetSelectorsOrBuilderin interfaceCluster.LbSubsetConfigOrBuilder
-
getSubsetSelectorsOrBuilderList
public List<? extends Cluster.LbSubsetConfig.LbSubsetSelectorOrBuilder> getSubsetSelectorsOrBuilderList()
For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value. For example: .. code-block:: json { "subset_selectors": [ { "keys": [ "version" ] }, { "keys": [ "stage", "hardware_type" ] } ]} A subset is matched when the metadata from the selected route and weighted cluster contains the same keys and values as the subset's metadata. The same host may appear in multiple subsets.repeated .envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector subset_selectors = 3;- Specified by:
getSubsetSelectorsOrBuilderListin interfaceCluster.LbSubsetConfigOrBuilder
-
addSubsetSelectorsBuilder
public Cluster.LbSubsetConfig.LbSubsetSelector.Builder addSubsetSelectorsBuilder()
For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value. For example: .. code-block:: json { "subset_selectors": [ { "keys": [ "version" ] }, { "keys": [ "stage", "hardware_type" ] } ]} A subset is matched when the metadata from the selected route and weighted cluster contains the same keys and values as the subset's metadata. The same host may appear in multiple subsets.repeated .envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector subset_selectors = 3;
-
addSubsetSelectorsBuilder
public Cluster.LbSubsetConfig.LbSubsetSelector.Builder addSubsetSelectorsBuilder(int index)
For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value. For example: .. code-block:: json { "subset_selectors": [ { "keys": [ "version" ] }, { "keys": [ "stage", "hardware_type" ] } ]} A subset is matched when the metadata from the selected route and weighted cluster contains the same keys and values as the subset's metadata. The same host may appear in multiple subsets.repeated .envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector subset_selectors = 3;
-
getSubsetSelectorsBuilderList
public List<Cluster.LbSubsetConfig.LbSubsetSelector.Builder> getSubsetSelectorsBuilderList()
For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value. For example: .. code-block:: json { "subset_selectors": [ { "keys": [ "version" ] }, { "keys": [ "stage", "hardware_type" ] } ]} A subset is matched when the metadata from the selected route and weighted cluster contains the same keys and values as the subset's metadata. The same host may appear in multiple subsets.repeated .envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector subset_selectors = 3;
-
getLocalityWeightAware
public boolean getLocalityWeightAware()
If true, routing to subsets will take into account the localities and locality weights of the endpoints when making the routing decision. There are some potential pitfalls associated with enabling this feature, as the resulting traffic split after applying both a subset match and locality weights might be undesirable. Consider for example a situation in which you have 50/50 split across two localities X/Y which have 100 hosts each without subsetting. If the subset LB results in X having only 1 host selected but Y having 100, then a lot more load is being dumped on the single host in X than originally anticipated in the load balancing assignment delivered via EDS.
bool locality_weight_aware = 4;- Specified by:
getLocalityWeightAwarein interfaceCluster.LbSubsetConfigOrBuilder- Returns:
- The localityWeightAware.
-
setLocalityWeightAware
public Cluster.LbSubsetConfig.Builder setLocalityWeightAware(boolean value)
If true, routing to subsets will take into account the localities and locality weights of the endpoints when making the routing decision. There are some potential pitfalls associated with enabling this feature, as the resulting traffic split after applying both a subset match and locality weights might be undesirable. Consider for example a situation in which you have 50/50 split across two localities X/Y which have 100 hosts each without subsetting. If the subset LB results in X having only 1 host selected but Y having 100, then a lot more load is being dumped on the single host in X than originally anticipated in the load balancing assignment delivered via EDS.
bool locality_weight_aware = 4;- Parameters:
value- The localityWeightAware to set.- Returns:
- This builder for chaining.
-
clearLocalityWeightAware
public Cluster.LbSubsetConfig.Builder clearLocalityWeightAware()
If true, routing to subsets will take into account the localities and locality weights of the endpoints when making the routing decision. There are some potential pitfalls associated with enabling this feature, as the resulting traffic split after applying both a subset match and locality weights might be undesirable. Consider for example a situation in which you have 50/50 split across two localities X/Y which have 100 hosts each without subsetting. If the subset LB results in X having only 1 host selected but Y having 100, then a lot more load is being dumped on the single host in X than originally anticipated in the load balancing assignment delivered via EDS.
bool locality_weight_aware = 4;- Returns:
- This builder for chaining.
-
getScaleLocalityWeight
public boolean getScaleLocalityWeight()
When used with locality_weight_aware, scales the weight of each locality by the ratio of hosts in the subset vs hosts in the original subset. This aims to even out the load going to an individual locality if said locality is disproportionately affected by the subset predicate.
bool scale_locality_weight = 5;- Specified by:
getScaleLocalityWeightin interfaceCluster.LbSubsetConfigOrBuilder- Returns:
- The scaleLocalityWeight.
-
setScaleLocalityWeight
public Cluster.LbSubsetConfig.Builder setScaleLocalityWeight(boolean value)
When used with locality_weight_aware, scales the weight of each locality by the ratio of hosts in the subset vs hosts in the original subset. This aims to even out the load going to an individual locality if said locality is disproportionately affected by the subset predicate.
bool scale_locality_weight = 5;- Parameters:
value- The scaleLocalityWeight to set.- Returns:
- This builder for chaining.
-
clearScaleLocalityWeight
public Cluster.LbSubsetConfig.Builder clearScaleLocalityWeight()
When used with locality_weight_aware, scales the weight of each locality by the ratio of hosts in the subset vs hosts in the original subset. This aims to even out the load going to an individual locality if said locality is disproportionately affected by the subset predicate.
bool scale_locality_weight = 5;- Returns:
- This builder for chaining.
-
getPanicModeAny
public boolean getPanicModeAny()
If true, when a fallback policy is configured and its corresponding subset fails to find a host this will cause any host to be selected instead. This is useful when using the default subset as the fallback policy, given the default subset might become empty. With this option enabled, if that happens the LB will attempt to select a host from the entire cluster.
bool panic_mode_any = 6;- Specified by:
getPanicModeAnyin interfaceCluster.LbSubsetConfigOrBuilder- Returns:
- The panicModeAny.
-
setPanicModeAny
public Cluster.LbSubsetConfig.Builder setPanicModeAny(boolean value)
If true, when a fallback policy is configured and its corresponding subset fails to find a host this will cause any host to be selected instead. This is useful when using the default subset as the fallback policy, given the default subset might become empty. With this option enabled, if that happens the LB will attempt to select a host from the entire cluster.
bool panic_mode_any = 6;- Parameters:
value- The panicModeAny to set.- Returns:
- This builder for chaining.
-
clearPanicModeAny
public Cluster.LbSubsetConfig.Builder clearPanicModeAny()
If true, when a fallback policy is configured and its corresponding subset fails to find a host this will cause any host to be selected instead. This is useful when using the default subset as the fallback policy, given the default subset might become empty. With this option enabled, if that happens the LB will attempt to select a host from the entire cluster.
bool panic_mode_any = 6;- Returns:
- This builder for chaining.
-
getListAsAny
public boolean getListAsAny()
If true, metadata specified for a metadata key will be matched against the corresponding endpoint metadata if the endpoint metadata matches the value exactly OR it is a list value and any of the elements in the list matches the criteria.
bool list_as_any = 7;- Specified by:
getListAsAnyin interfaceCluster.LbSubsetConfigOrBuilder- Returns:
- The listAsAny.
-
setListAsAny
public Cluster.LbSubsetConfig.Builder setListAsAny(boolean value)
If true, metadata specified for a metadata key will be matched against the corresponding endpoint metadata if the endpoint metadata matches the value exactly OR it is a list value and any of the elements in the list matches the criteria.
bool list_as_any = 7;- Parameters:
value- The listAsAny to set.- Returns:
- This builder for chaining.
-
clearListAsAny
public Cluster.LbSubsetConfig.Builder clearListAsAny()
If true, metadata specified for a metadata key will be matched against the corresponding endpoint metadata if the endpoint metadata matches the value exactly OR it is a list value and any of the elements in the list matches the criteria.
bool list_as_any = 7;- Returns:
- This builder for chaining.
-
setUnknownFields
public final Cluster.LbSubsetConfig.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Cluster.LbSubsetConfig.Builder>
-
mergeUnknownFields
public final Cluster.LbSubsetConfig.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Cluster.LbSubsetConfig.Builder>
-
-