java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<Subset.Builder>
io.envoyproxy.envoy.extensions.load_balancing_policies.subset.v3.Subset.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, SubsetOrBuilder, Cloneable
Enclosing class:
Subset

public static final class Subset.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Subset.Builder> implements SubsetOrBuilder
 Optionally divide the endpoints in this cluster into subsets defined by
 endpoint metadata and selected by route and weighted cluster metadata.
 [#next-free-field: 11]
 
Protobuf type envoy.extensions.load_balancing_policies.subset.v3.Subset
  • Method Summary

    Modifier and Type
    Method
    Description
    For each entry, LbEndpoint.Metadata's ``envoy.lb`` namespace is traversed and a subset is created for each unique combination of key and value.
    addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object 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 each entry, LbEndpoint.Metadata's ``envoy.lb`` namespace is traversed and a subset is created for each unique combination of key and 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 each entry, LbEndpoint.Metadata's ``envoy.lb`` namespace is traversed and a subset is created for each unique combination of key and 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 each entry, LbEndpoint.Metadata's ``envoy.lb`` namespace is traversed and a subset is created for each unique combination of key and value.
     
     
     
    By default, only when the request metadata has exactly the **same** keys as one of subset selectors and the values of the related keys are matched, the load balancer will have a valid subset for the request.
    Specifies the default subset of endpoints used during fallback if fallback_policy is :ref:`DEFAULT_SUBSET<envoy_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`.
    The behavior used when no endpoint subset matches the selected route's metadata.
    clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
     
    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.
    If true, routing to subsets will take into account the localities and locality weights of the endpoints when making the routing decision.
    Fallback mechanism that allows to try different route metadata until a host is found.
    clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
     
    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.
    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.
    The child LB policy to create for endpoint-picking within the chosen subset.
    For each entry, LbEndpoint.Metadata's ``envoy.lb`` namespace is traversed and a subset is created for each unique combination of key and value.
     
    boolean
    By default, only when the request metadata has exactly the **same** keys as one of subset selectors and the values of the related keys are matched, the load balancer will have a valid subset for the request.
     
    com.google.protobuf.Struct
    Specifies the default subset of endpoints used during fallback if fallback_policy is :ref:`DEFAULT_SUBSET<envoy_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`.
    com.google.protobuf.Struct.Builder
    Specifies the default subset of endpoints used during fallback if fallback_policy is :ref:`DEFAULT_SUBSET<envoy_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`.
    com.google.protobuf.StructOrBuilder
    Specifies the default subset of endpoints used during fallback if fallback_policy is :ref:`DEFAULT_SUBSET<envoy_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`.
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    The behavior used when no endpoint subset matches the selected route's metadata.
    int
    The behavior used when no endpoint subset matches the selected route's metadata.
    boolean
    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.
    boolean
    If true, routing to subsets will take into account the localities and locality weights of the endpoints when making the routing decision.
    Fallback mechanism that allows to try different route metadata until a host is found.
    int
    Fallback mechanism that allows to try different route metadata until a host is found.
    boolean
    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.
    boolean
    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.
    The child LB policy to create for endpoint-picking within the chosen subset.
    The child LB policy to create for endpoint-picking within the chosen subset.
    The child LB policy to create for endpoint-picking within the chosen subset.
    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 each entry, LbEndpoint.Metadata's ``envoy.lb`` namespace is traversed and a subset is created for each unique combination of key and 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.
    int
    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 each entry, LbEndpoint.Metadata's ``envoy.lb`` namespace is traversed and a subset is created for each unique combination of key and 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 each entry, LbEndpoint.Metadata's ``envoy.lb`` namespace is traversed and a subset is created for each unique combination of key and value.
    boolean
    Specifies the default subset of endpoints used during fallback if fallback_policy is :ref:`DEFAULT_SUBSET<envoy_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`.
    boolean
    The child LB policy to create for endpoint-picking within the chosen subset.
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
     
    final boolean
     
    mergeDefaultSubset(com.google.protobuf.Struct value)
    Specifies the default subset of endpoints used during fallback if fallback_policy is :ref:`DEFAULT_SUBSET<envoy_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`.
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
     
    The child LB policy to create for endpoint-picking within the chosen subset.
    mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
     
    For each entry, LbEndpoint.Metadata's ``envoy.lb`` namespace is traversed and a subset is created for each unique combination of key and value.
    setAllowRedundantKeys(boolean value)
    By default, only when the request metadata has exactly the **same** keys as one of subset selectors and the values of the related keys are matched, the load balancer will have a valid subset for the request.
    setDefaultSubset(com.google.protobuf.Struct value)
    Specifies the default subset of endpoints used during fallback if fallback_policy is :ref:`DEFAULT_SUBSET<envoy_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`.
    setDefaultSubset(com.google.protobuf.Struct.Builder builderForValue)
    Specifies the default subset of endpoints used during fallback if fallback_policy is :ref:`DEFAULT_SUBSET<envoy_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`.
    The behavior used when no endpoint subset matches the selected route's metadata.
    The behavior used when no endpoint subset matches the selected route's metadata.
    setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
     
    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.
    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.
    Fallback mechanism that allows to try different route metadata until a host is found.
    Fallback mechanism that allows to try different route metadata until a host is found.
    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.
    setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
     
    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.
    The child LB policy to create for endpoint-picking within the chosen subset.
    The child LB policy to create for endpoint-picking within the chosen subset.
    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 each entry, LbEndpoint.Metadata's ``envoy.lb`` namespace is traversed and a subset is created for each unique combination of key and value.
    setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
     

    Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder

    getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, 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

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Subset.Builder>
    • clear

      public Subset.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<Subset.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Subset.Builder>
    • getDefaultInstanceForType

      public Subset getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Subset build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Subset buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      public Subset.Builder clone()
      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<Subset.Builder>
    • setField

      public Subset.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<Subset.Builder>
    • clearField

      public Subset.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Subset.Builder>
    • clearOneof

      public Subset.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Subset.Builder>
    • setRepeatedField

      public Subset.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Subset.Builder>
    • addRepeatedField

      public Subset.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Subset.Builder>
    • mergeFrom

      public Subset.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Subset.Builder>
    • mergeFrom

      public Subset.Builder mergeFrom(Subset other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Subset.Builder>
    • mergeFrom

      public Subset.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Subset.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_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetFallbackPolicy.NO_FALLBACK>`.
       
      .envoy.extensions.load_balancing_policies.subset.v3.Subset.LbSubsetFallbackPolicy fallback_policy = 1 [(.validate.rules) = { ... }
      Specified by:
      getFallbackPolicyValue in interface SubsetOrBuilder
      Returns:
      The enum numeric value on the wire for fallbackPolicy.
    • setFallbackPolicyValue

      public Subset.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_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetFallbackPolicy.NO_FALLBACK>`.
       
      .envoy.extensions.load_balancing_policies.subset.v3.Subset.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 Subset.LbSubsetFallbackPolicy getFallbackPolicy()
       The behavior used when no endpoint subset matches the selected route's
       metadata. The value defaults to
       :ref:`NO_FALLBACK<envoy_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetFallbackPolicy.NO_FALLBACK>`.
       
      .envoy.extensions.load_balancing_policies.subset.v3.Subset.LbSubsetFallbackPolicy fallback_policy = 1 [(.validate.rules) = { ... }
      Specified by:
      getFallbackPolicy in interface SubsetOrBuilder
      Returns:
      The fallbackPolicy.
    • setFallbackPolicy

      public Subset.Builder setFallbackPolicy(Subset.LbSubsetFallbackPolicy value)
       The behavior used when no endpoint subset matches the selected route's
       metadata. The value defaults to
       :ref:`NO_FALLBACK<envoy_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetFallbackPolicy.NO_FALLBACK>`.
       
      .envoy.extensions.load_balancing_policies.subset.v3.Subset.LbSubsetFallbackPolicy fallback_policy = 1 [(.validate.rules) = { ... }
      Parameters:
      value - The fallbackPolicy to set.
      Returns:
      This builder for chaining.
    • clearFallbackPolicy

      public Subset.Builder clearFallbackPolicy()
       The behavior used when no endpoint subset matches the selected route's
       metadata. The value defaults to
       :ref:`NO_FALLBACK<envoy_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetFallbackPolicy.NO_FALLBACK>`.
       
      .envoy.extensions.load_balancing_policies.subset.v3.Subset.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_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.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_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetFallbackPolicy.NO_FALLBACK>`.
       
      .google.protobuf.Struct default_subset = 2;
      Specified by:
      hasDefaultSubset in interface SubsetOrBuilder
      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_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.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_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetFallbackPolicy.NO_FALLBACK>`.
       
      .google.protobuf.Struct default_subset = 2;
      Specified by:
      getDefaultSubset in interface SubsetOrBuilder
      Returns:
      The defaultSubset.
    • setDefaultSubset

      public Subset.Builder setDefaultSubset(com.google.protobuf.Struct value)
       Specifies the default subset of endpoints used during fallback if
       fallback_policy is
       :ref:`DEFAULT_SUBSET<envoy_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.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_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetFallbackPolicy.NO_FALLBACK>`.
       
      .google.protobuf.Struct default_subset = 2;
    • setDefaultSubset

      public Subset.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_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.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_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetFallbackPolicy.NO_FALLBACK>`.
       
      .google.protobuf.Struct default_subset = 2;
    • mergeDefaultSubset

      public Subset.Builder mergeDefaultSubset(com.google.protobuf.Struct value)
       Specifies the default subset of endpoints used during fallback if
       fallback_policy is
       :ref:`DEFAULT_SUBSET<envoy_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.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_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetFallbackPolicy.NO_FALLBACK>`.
       
      .google.protobuf.Struct default_subset = 2;
    • clearDefaultSubset

      public Subset.Builder clearDefaultSubset()
       Specifies the default subset of endpoints used during fallback if
       fallback_policy is
       :ref:`DEFAULT_SUBSET<envoy_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.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_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.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_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.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_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.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_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.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_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetFallbackPolicy.NO_FALLBACK>`.
       
      .google.protobuf.Struct default_subset = 2;
      Specified by:
      getDefaultSubsetOrBuilder in interface SubsetOrBuilder
    • getSubsetSelectorsList

      public List<Subset.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.extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector subset_selectors = 3;
      Specified by:
      getSubsetSelectorsList in interface SubsetOrBuilder
    • 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.extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector subset_selectors = 3;
      Specified by:
      getSubsetSelectorsCount in interface SubsetOrBuilder
    • getSubsetSelectors

      public Subset.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.extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector subset_selectors = 3;
      Specified by:
      getSubsetSelectors in interface SubsetOrBuilder
    • setSubsetSelectors

      public Subset.Builder setSubsetSelectors(int index, Subset.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.extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector subset_selectors = 3;
    • setSubsetSelectors

      public Subset.Builder setSubsetSelectors(int index, Subset.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.extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector subset_selectors = 3;
    • addSubsetSelectors

      public Subset.Builder addSubsetSelectors(Subset.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.extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector subset_selectors = 3;
    • addSubsetSelectors

      public Subset.Builder addSubsetSelectors(int index, Subset.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.extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector subset_selectors = 3;
    • addSubsetSelectors

      public Subset.Builder addSubsetSelectors(Subset.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.extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector subset_selectors = 3;
    • addSubsetSelectors

      public Subset.Builder addSubsetSelectors(int index, Subset.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.extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector subset_selectors = 3;
    • addAllSubsetSelectors

      public Subset.Builder addAllSubsetSelectors(Iterable<? extends Subset.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.extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector subset_selectors = 3;
    • clearSubsetSelectors

      public Subset.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.extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector subset_selectors = 3;
    • removeSubsetSelectors

      public Subset.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.extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector subset_selectors = 3;
    • getSubsetSelectorsBuilder

      public Subset.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.extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector subset_selectors = 3;
    • getSubsetSelectorsOrBuilder

      public Subset.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.extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector subset_selectors = 3;
      Specified by:
      getSubsetSelectorsOrBuilder in interface SubsetOrBuilder
    • getSubsetSelectorsOrBuilderList

      public List<? extends Subset.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.extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector subset_selectors = 3;
      Specified by:
      getSubsetSelectorsOrBuilderList in interface SubsetOrBuilder
    • addSubsetSelectorsBuilder

      public Subset.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.extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector subset_selectors = 3;
    • addSubsetSelectorsBuilder

      public Subset.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.extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector subset_selectors = 3;
    • getSubsetSelectorsBuilderList

      public List<Subset.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.extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector subset_selectors = 3;
    • getAllowRedundantKeys

      public boolean getAllowRedundantKeys()
       By default, only when the request metadata has exactly the **same** keys as one of subset selectors and
       the values of the related keys are matched, the load balancer will have a valid subset for the request.
       For example, given the following subset selectors:
      
       .. code-block:: json
      
         { "subset_selectors": [
             { "keys": [ "version" ] },
             { "keys": [ "stage", "version" ] }
         ]}
      
       A request with metadata ``{"redundant-key": "redundant-value", "stage": "prod", "version": "v1"}`` or
       ``{"redundant-key": "redundant-value", "version": "v1"}`` will not have a valid subset even if the values
       of keys ``stage`` and ``version`` are matched because of the redundant key/value pair in the request
       metadata.
      
       By setting this field to true, the most appropriate keys will be filtered out from the request metadata
       according to the subset selectors. And then the filtered keys and related values will be matched to find
       the valid host subset. By this way, redundant key/value pairs are allowed in the request metadata. The keys
       of a request metadata could be superset of the keys of the subset selectors and need not to be exactly the
       same as the keys of the subset selectors.
      
       More specifically, if the keys of a request metadata is a superset of one of the subset selectors, then only
       the values of the keys that in the selector keys will be matched. Take the above example, if the request
       metadata is ``{"redundant-key": "redundant-value", "stage": "prod", "version": "v1"}``, the load balancer
       will only match the values of ``stage`` and ``version`` to find an appropriate subset because ``stage``
       ``version`` are contained by the second subset selector and the redundant ``redundant-key`` will be
       ignored.
      
       .. note::
         If the keys of request metadata is superset of multiple different subset selectors keys, the subset
         selector with most keys to win. For example, given subset selectors
         ``{"subset_selectors": ["keys": ["A", "B", "C"], ["A", "B"]]}`` and request metadata ``{"A": "-",
         "B": "-", "C": "-", "D": "-"}``, keys ``A``, ``B``, ``C`` will be evaluated.
         If the keys of request metadata is superset of multiple different subset selectors keys and the number
         of selector keys are same, then the one placed in front to win. For example, given subset selectors
         ``{"subset_selectors": ["keys": ["A", "B"], ["C", "D"]]}`` and request metadata ``{"A": "-", "B": "-",
         "C": "-", "D": "-"}``, keys ``A``, ``B`` will be evaluated.
       
      bool allow_redundant_keys = 10;
      Specified by:
      getAllowRedundantKeys in interface SubsetOrBuilder
      Returns:
      The allowRedundantKeys.
    • setAllowRedundantKeys

      public Subset.Builder setAllowRedundantKeys(boolean value)
       By default, only when the request metadata has exactly the **same** keys as one of subset selectors and
       the values of the related keys are matched, the load balancer will have a valid subset for the request.
       For example, given the following subset selectors:
      
       .. code-block:: json
      
         { "subset_selectors": [
             { "keys": [ "version" ] },
             { "keys": [ "stage", "version" ] }
         ]}
      
       A request with metadata ``{"redundant-key": "redundant-value", "stage": "prod", "version": "v1"}`` or
       ``{"redundant-key": "redundant-value", "version": "v1"}`` will not have a valid subset even if the values
       of keys ``stage`` and ``version`` are matched because of the redundant key/value pair in the request
       metadata.
      
       By setting this field to true, the most appropriate keys will be filtered out from the request metadata
       according to the subset selectors. And then the filtered keys and related values will be matched to find
       the valid host subset. By this way, redundant key/value pairs are allowed in the request metadata. The keys
       of a request metadata could be superset of the keys of the subset selectors and need not to be exactly the
       same as the keys of the subset selectors.
      
       More specifically, if the keys of a request metadata is a superset of one of the subset selectors, then only
       the values of the keys that in the selector keys will be matched. Take the above example, if the request
       metadata is ``{"redundant-key": "redundant-value", "stage": "prod", "version": "v1"}``, the load balancer
       will only match the values of ``stage`` and ``version`` to find an appropriate subset because ``stage``
       ``version`` are contained by the second subset selector and the redundant ``redundant-key`` will be
       ignored.
      
       .. note::
         If the keys of request metadata is superset of multiple different subset selectors keys, the subset
         selector with most keys to win. For example, given subset selectors
         ``{"subset_selectors": ["keys": ["A", "B", "C"], ["A", "B"]]}`` and request metadata ``{"A": "-",
         "B": "-", "C": "-", "D": "-"}``, keys ``A``, ``B``, ``C`` will be evaluated.
         If the keys of request metadata is superset of multiple different subset selectors keys and the number
         of selector keys are same, then the one placed in front to win. For example, given subset selectors
         ``{"subset_selectors": ["keys": ["A", "B"], ["C", "D"]]}`` and request metadata ``{"A": "-", "B": "-",
         "C": "-", "D": "-"}``, keys ``A``, ``B`` will be evaluated.
       
      bool allow_redundant_keys = 10;
      Parameters:
      value - The allowRedundantKeys to set.
      Returns:
      This builder for chaining.
    • clearAllowRedundantKeys

      public Subset.Builder clearAllowRedundantKeys()
       By default, only when the request metadata has exactly the **same** keys as one of subset selectors and
       the values of the related keys are matched, the load balancer will have a valid subset for the request.
       For example, given the following subset selectors:
      
       .. code-block:: json
      
         { "subset_selectors": [
             { "keys": [ "version" ] },
             { "keys": [ "stage", "version" ] }
         ]}
      
       A request with metadata ``{"redundant-key": "redundant-value", "stage": "prod", "version": "v1"}`` or
       ``{"redundant-key": "redundant-value", "version": "v1"}`` will not have a valid subset even if the values
       of keys ``stage`` and ``version`` are matched because of the redundant key/value pair in the request
       metadata.
      
       By setting this field to true, the most appropriate keys will be filtered out from the request metadata
       according to the subset selectors. And then the filtered keys and related values will be matched to find
       the valid host subset. By this way, redundant key/value pairs are allowed in the request metadata. The keys
       of a request metadata could be superset of the keys of the subset selectors and need not to be exactly the
       same as the keys of the subset selectors.
      
       More specifically, if the keys of a request metadata is a superset of one of the subset selectors, then only
       the values of the keys that in the selector keys will be matched. Take the above example, if the request
       metadata is ``{"redundant-key": "redundant-value", "stage": "prod", "version": "v1"}``, the load balancer
       will only match the values of ``stage`` and ``version`` to find an appropriate subset because ``stage``
       ``version`` are contained by the second subset selector and the redundant ``redundant-key`` will be
       ignored.
      
       .. note::
         If the keys of request metadata is superset of multiple different subset selectors keys, the subset
         selector with most keys to win. For example, given subset selectors
         ``{"subset_selectors": ["keys": ["A", "B", "C"], ["A", "B"]]}`` and request metadata ``{"A": "-",
         "B": "-", "C": "-", "D": "-"}``, keys ``A``, ``B``, ``C`` will be evaluated.
         If the keys of request metadata is superset of multiple different subset selectors keys and the number
         of selector keys are same, then the one placed in front to win. For example, given subset selectors
         ``{"subset_selectors": ["keys": ["A", "B"], ["C", "D"]]}`` and request metadata ``{"A": "-", "B": "-",
         "C": "-", "D": "-"}``, keys ``A``, ``B`` will be evaluated.
       
      bool allow_redundant_keys = 10;
      Returns:
      This builder for chaining.
    • 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:
      getLocalityWeightAware in interface SubsetOrBuilder
      Returns:
      The localityWeightAware.
    • setLocalityWeightAware

      public Subset.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 Subset.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:
      getScaleLocalityWeight in interface SubsetOrBuilder
      Returns:
      The scaleLocalityWeight.
    • setScaleLocalityWeight

      public Subset.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 Subset.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:
      getPanicModeAny in interface SubsetOrBuilder
      Returns:
      The panicModeAny.
    • setPanicModeAny

      public Subset.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 Subset.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:
      getListAsAny in interface SubsetOrBuilder
      Returns:
      The listAsAny.
    • setListAsAny

      public Subset.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 Subset.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.
    • getMetadataFallbackPolicyValue

      public int getMetadataFallbackPolicyValue()
       Fallback mechanism that allows to try different route metadata until a host is found.
       If load balancing process, including all its mechanisms (like
       :ref:`fallback_policy<envoy_v3_api_field_extensions.load_balancing_policies.subset.v3.subset.fallback_policy>`)
       fails to select a host, this policy decides if and how the process is repeated using another metadata.
      
       The value defaults to
       :ref:`METADATA_NO_FALLBACK
       <envoy_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.subset.LbSubsetMetadataFallbackPolicy.METADATA_NO_FALLBACK>`.
       
      .envoy.extensions.load_balancing_policies.subset.v3.Subset.LbSubsetMetadataFallbackPolicy metadata_fallback_policy = 8 [(.validate.rules) = { ... }
      Specified by:
      getMetadataFallbackPolicyValue in interface SubsetOrBuilder
      Returns:
      The enum numeric value on the wire for metadataFallbackPolicy.
    • setMetadataFallbackPolicyValue

      public Subset.Builder setMetadataFallbackPolicyValue(int value)
       Fallback mechanism that allows to try different route metadata until a host is found.
       If load balancing process, including all its mechanisms (like
       :ref:`fallback_policy<envoy_v3_api_field_extensions.load_balancing_policies.subset.v3.subset.fallback_policy>`)
       fails to select a host, this policy decides if and how the process is repeated using another metadata.
      
       The value defaults to
       :ref:`METADATA_NO_FALLBACK
       <envoy_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.subset.LbSubsetMetadataFallbackPolicy.METADATA_NO_FALLBACK>`.
       
      .envoy.extensions.load_balancing_policies.subset.v3.Subset.LbSubsetMetadataFallbackPolicy metadata_fallback_policy = 8 [(.validate.rules) = { ... }
      Parameters:
      value - The enum numeric value on the wire for metadataFallbackPolicy to set.
      Returns:
      This builder for chaining.
    • getMetadataFallbackPolicy

      public Subset.LbSubsetMetadataFallbackPolicy getMetadataFallbackPolicy()
       Fallback mechanism that allows to try different route metadata until a host is found.
       If load balancing process, including all its mechanisms (like
       :ref:`fallback_policy<envoy_v3_api_field_extensions.load_balancing_policies.subset.v3.subset.fallback_policy>`)
       fails to select a host, this policy decides if and how the process is repeated using another metadata.
      
       The value defaults to
       :ref:`METADATA_NO_FALLBACK
       <envoy_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.subset.LbSubsetMetadataFallbackPolicy.METADATA_NO_FALLBACK>`.
       
      .envoy.extensions.load_balancing_policies.subset.v3.Subset.LbSubsetMetadataFallbackPolicy metadata_fallback_policy = 8 [(.validate.rules) = { ... }
      Specified by:
      getMetadataFallbackPolicy in interface SubsetOrBuilder
      Returns:
      The metadataFallbackPolicy.
    • setMetadataFallbackPolicy

      public Subset.Builder setMetadataFallbackPolicy(Subset.LbSubsetMetadataFallbackPolicy value)
       Fallback mechanism that allows to try different route metadata until a host is found.
       If load balancing process, including all its mechanisms (like
       :ref:`fallback_policy<envoy_v3_api_field_extensions.load_balancing_policies.subset.v3.subset.fallback_policy>`)
       fails to select a host, this policy decides if and how the process is repeated using another metadata.
      
       The value defaults to
       :ref:`METADATA_NO_FALLBACK
       <envoy_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.subset.LbSubsetMetadataFallbackPolicy.METADATA_NO_FALLBACK>`.
       
      .envoy.extensions.load_balancing_policies.subset.v3.Subset.LbSubsetMetadataFallbackPolicy metadata_fallback_policy = 8 [(.validate.rules) = { ... }
      Parameters:
      value - The metadataFallbackPolicy to set.
      Returns:
      This builder for chaining.
    • clearMetadataFallbackPolicy

      public Subset.Builder clearMetadataFallbackPolicy()
       Fallback mechanism that allows to try different route metadata until a host is found.
       If load balancing process, including all its mechanisms (like
       :ref:`fallback_policy<envoy_v3_api_field_extensions.load_balancing_policies.subset.v3.subset.fallback_policy>`)
       fails to select a host, this policy decides if and how the process is repeated using another metadata.
      
       The value defaults to
       :ref:`METADATA_NO_FALLBACK
       <envoy_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.subset.LbSubsetMetadataFallbackPolicy.METADATA_NO_FALLBACK>`.
       
      .envoy.extensions.load_balancing_policies.subset.v3.Subset.LbSubsetMetadataFallbackPolicy metadata_fallback_policy = 8 [(.validate.rules) = { ... }
      Returns:
      This builder for chaining.
    • hasSubsetLbPolicy

      public boolean hasSubsetLbPolicy()
       The child LB policy to create for endpoint-picking within the chosen subset.
       
      .envoy.config.cluster.v3.LoadBalancingPolicy subset_lb_policy = 9 [(.validate.rules) = { ... }
      Specified by:
      hasSubsetLbPolicy in interface SubsetOrBuilder
      Returns:
      Whether the subsetLbPolicy field is set.
    • getSubsetLbPolicy

      public LoadBalancingPolicy getSubsetLbPolicy()
       The child LB policy to create for endpoint-picking within the chosen subset.
       
      .envoy.config.cluster.v3.LoadBalancingPolicy subset_lb_policy = 9 [(.validate.rules) = { ... }
      Specified by:
      getSubsetLbPolicy in interface SubsetOrBuilder
      Returns:
      The subsetLbPolicy.
    • setSubsetLbPolicy

      public Subset.Builder setSubsetLbPolicy(LoadBalancingPolicy value)
       The child LB policy to create for endpoint-picking within the chosen subset.
       
      .envoy.config.cluster.v3.LoadBalancingPolicy subset_lb_policy = 9 [(.validate.rules) = { ... }
    • setSubsetLbPolicy

      public Subset.Builder setSubsetLbPolicy(LoadBalancingPolicy.Builder builderForValue)
       The child LB policy to create for endpoint-picking within the chosen subset.
       
      .envoy.config.cluster.v3.LoadBalancingPolicy subset_lb_policy = 9 [(.validate.rules) = { ... }
    • mergeSubsetLbPolicy

      public Subset.Builder mergeSubsetLbPolicy(LoadBalancingPolicy value)
       The child LB policy to create for endpoint-picking within the chosen subset.
       
      .envoy.config.cluster.v3.LoadBalancingPolicy subset_lb_policy = 9 [(.validate.rules) = { ... }
    • clearSubsetLbPolicy

      public Subset.Builder clearSubsetLbPolicy()
       The child LB policy to create for endpoint-picking within the chosen subset.
       
      .envoy.config.cluster.v3.LoadBalancingPolicy subset_lb_policy = 9 [(.validate.rules) = { ... }
    • getSubsetLbPolicyBuilder

      public LoadBalancingPolicy.Builder getSubsetLbPolicyBuilder()
       The child LB policy to create for endpoint-picking within the chosen subset.
       
      .envoy.config.cluster.v3.LoadBalancingPolicy subset_lb_policy = 9 [(.validate.rules) = { ... }
    • getSubsetLbPolicyOrBuilder

      public LoadBalancingPolicyOrBuilder getSubsetLbPolicyOrBuilder()
       The child LB policy to create for endpoint-picking within the chosen subset.
       
      .envoy.config.cluster.v3.LoadBalancingPolicy subset_lb_policy = 9 [(.validate.rules) = { ... }
      Specified by:
      getSubsetLbPolicyOrBuilder in interface SubsetOrBuilder
    • setUnknownFields

      public final Subset.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Subset.Builder>
    • mergeUnknownFields

      public final Subset.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Subset.Builder>