Class Cluster.LbSubsetConfig.LbSubsetSelector.Builder

    • Method Detail

      • 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<Cluster.LbSubsetConfig.LbSubsetSelector.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<Cluster.LbSubsetConfig.LbSubsetSelector.Builder>
      • getDefaultInstanceForType

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

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

        public Cluster.LbSubsetConfig.LbSubsetSelector buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Cluster.LbSubsetConfig.LbSubsetSelector.Builder>
      • getKeys

        public String getKeys​(int index)
         List of keys to match with the weighted cluster metadata.
         
        repeated string keys = 1;
        Specified by:
        getKeys in interface Cluster.LbSubsetConfig.LbSubsetSelectorOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The keys at the given index.
      • getKeysBytes

        public com.google.protobuf.ByteString getKeysBytes​(int index)
         List of keys to match with the weighted cluster metadata.
         
        repeated string keys = 1;
        Specified by:
        getKeysBytes in interface Cluster.LbSubsetConfig.LbSubsetSelectorOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the keys at the given index.
      • setKeys

        public Cluster.LbSubsetConfig.LbSubsetSelector.Builder setKeys​(int index,
                                                                       String value)
         List of keys to match with the weighted cluster metadata.
         
        repeated string keys = 1;
        Parameters:
        index - The index to set the value at.
        value - The keys to set.
        Returns:
        This builder for chaining.
      • addKeysBytes

        public Cluster.LbSubsetConfig.LbSubsetSelector.Builder addKeysBytes​(com.google.protobuf.ByteString value)
         List of keys to match with the weighted cluster metadata.
         
        repeated string keys = 1;
        Parameters:
        value - The bytes of the keys to add.
        Returns:
        This builder for chaining.
      • getSingleHostPerSubset

        public boolean getSingleHostPerSubset()
         Selects a mode of operation in which each subset has only one host. This mode uses the same rules for
         choosing a host, but updating hosts is faster, especially for large numbers of hosts.
         If a match is found to a host, that host will be used regardless of priority levels, unless the host is unhealthy.
         Currently, this mode is only supported if ``subset_selectors`` has only one entry, and ``keys`` contains
         only one entry.
         When this mode is enabled, configurations that contain more than one host with the same metadata value for the single key in ``keys``
         will use only one of the hosts with the given key; no requests will be routed to the others. The cluster gauge
         :ref:`lb_subsets_single_host_per_subset_duplicate<config_cluster_manager_cluster_stats_subset_lb>` indicates how many duplicates are
         present in the current configuration.
         
        bool single_host_per_subset = 4;
        Specified by:
        getSingleHostPerSubset in interface Cluster.LbSubsetConfig.LbSubsetSelectorOrBuilder
        Returns:
        The singleHostPerSubset.
      • setSingleHostPerSubset

        public Cluster.LbSubsetConfig.LbSubsetSelector.Builder setSingleHostPerSubset​(boolean value)
         Selects a mode of operation in which each subset has only one host. This mode uses the same rules for
         choosing a host, but updating hosts is faster, especially for large numbers of hosts.
         If a match is found to a host, that host will be used regardless of priority levels, unless the host is unhealthy.
         Currently, this mode is only supported if ``subset_selectors`` has only one entry, and ``keys`` contains
         only one entry.
         When this mode is enabled, configurations that contain more than one host with the same metadata value for the single key in ``keys``
         will use only one of the hosts with the given key; no requests will be routed to the others. The cluster gauge
         :ref:`lb_subsets_single_host_per_subset_duplicate<config_cluster_manager_cluster_stats_subset_lb>` indicates how many duplicates are
         present in the current configuration.
         
        bool single_host_per_subset = 4;
        Parameters:
        value - The singleHostPerSubset to set.
        Returns:
        This builder for chaining.
      • clearSingleHostPerSubset

        public Cluster.LbSubsetConfig.LbSubsetSelector.Builder clearSingleHostPerSubset()
         Selects a mode of operation in which each subset has only one host. This mode uses the same rules for
         choosing a host, but updating hosts is faster, especially for large numbers of hosts.
         If a match is found to a host, that host will be used regardless of priority levels, unless the host is unhealthy.
         Currently, this mode is only supported if ``subset_selectors`` has only one entry, and ``keys`` contains
         only one entry.
         When this mode is enabled, configurations that contain more than one host with the same metadata value for the single key in ``keys``
         will use only one of the hosts with the given key; no requests will be routed to the others. The cluster gauge
         :ref:`lb_subsets_single_host_per_subset_duplicate<config_cluster_manager_cluster_stats_subset_lb>` indicates how many duplicates are
         present in the current configuration.
         
        bool single_host_per_subset = 4;
        Returns:
        This builder for chaining.
      • getFallbackPolicyValue

        public int getFallbackPolicyValue()
         The behavior used when no endpoint subset matches the selected route's
         metadata.
         
        .envoy.config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.LbSubsetSelectorFallbackPolicy fallback_policy = 2 [(.validate.rules) = { ... }
        Specified by:
        getFallbackPolicyValue in interface Cluster.LbSubsetConfig.LbSubsetSelectorOrBuilder
        Returns:
        The enum numeric value on the wire for fallbackPolicy.
      • setFallbackPolicyValue

        public Cluster.LbSubsetConfig.LbSubsetSelector.Builder setFallbackPolicyValue​(int value)
         The behavior used when no endpoint subset matches the selected route's
         metadata.
         
        .envoy.config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.LbSubsetSelectorFallbackPolicy fallback_policy = 2 [(.validate.rules) = { ... }
        Parameters:
        value - The enum numeric value on the wire for fallbackPolicy to set.
        Returns:
        This builder for chaining.
      • clearFallbackPolicy

        public Cluster.LbSubsetConfig.LbSubsetSelector.Builder clearFallbackPolicy()
         The behavior used when no endpoint subset matches the selected route's
         metadata.
         
        .envoy.config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.LbSubsetSelectorFallbackPolicy fallback_policy = 2 [(.validate.rules) = { ... }
        Returns:
        This builder for chaining.
      • getFallbackKeysSubsetList

        public com.google.protobuf.ProtocolStringList getFallbackKeysSubsetList()
         Subset of
         :ref:`keys<envoy_v3_api_field_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.keys>` used by
         :ref:`KEYS_SUBSET<envoy_v3_api_enum_value_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.LbSubsetSelectorFallbackPolicy.KEYS_SUBSET>`
         fallback policy.
         It has to be a non empty list if KEYS_SUBSET fallback policy is selected.
         For any other fallback policy the parameter is not used and should not be set.
         Only values also present in
         :ref:`keys<envoy_v3_api_field_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.keys>` are allowed, but
         ``fallback_keys_subset`` cannot be equal to ``keys``.
         
        repeated string fallback_keys_subset = 3;
        Specified by:
        getFallbackKeysSubsetList in interface Cluster.LbSubsetConfig.LbSubsetSelectorOrBuilder
        Returns:
        A list containing the fallbackKeysSubset.
      • getFallbackKeysSubsetCount

        public int getFallbackKeysSubsetCount()
         Subset of
         :ref:`keys<envoy_v3_api_field_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.keys>` used by
         :ref:`KEYS_SUBSET<envoy_v3_api_enum_value_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.LbSubsetSelectorFallbackPolicy.KEYS_SUBSET>`
         fallback policy.
         It has to be a non empty list if KEYS_SUBSET fallback policy is selected.
         For any other fallback policy the parameter is not used and should not be set.
         Only values also present in
         :ref:`keys<envoy_v3_api_field_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.keys>` are allowed, but
         ``fallback_keys_subset`` cannot be equal to ``keys``.
         
        repeated string fallback_keys_subset = 3;
        Specified by:
        getFallbackKeysSubsetCount in interface Cluster.LbSubsetConfig.LbSubsetSelectorOrBuilder
        Returns:
        The count of fallbackKeysSubset.
      • getFallbackKeysSubset

        public String getFallbackKeysSubset​(int index)
         Subset of
         :ref:`keys<envoy_v3_api_field_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.keys>` used by
         :ref:`KEYS_SUBSET<envoy_v3_api_enum_value_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.LbSubsetSelectorFallbackPolicy.KEYS_SUBSET>`
         fallback policy.
         It has to be a non empty list if KEYS_SUBSET fallback policy is selected.
         For any other fallback policy the parameter is not used and should not be set.
         Only values also present in
         :ref:`keys<envoy_v3_api_field_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.keys>` are allowed, but
         ``fallback_keys_subset`` cannot be equal to ``keys``.
         
        repeated string fallback_keys_subset = 3;
        Specified by:
        getFallbackKeysSubset in interface Cluster.LbSubsetConfig.LbSubsetSelectorOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The fallbackKeysSubset at the given index.
      • getFallbackKeysSubsetBytes

        public com.google.protobuf.ByteString getFallbackKeysSubsetBytes​(int index)
         Subset of
         :ref:`keys<envoy_v3_api_field_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.keys>` used by
         :ref:`KEYS_SUBSET<envoy_v3_api_enum_value_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.LbSubsetSelectorFallbackPolicy.KEYS_SUBSET>`
         fallback policy.
         It has to be a non empty list if KEYS_SUBSET fallback policy is selected.
         For any other fallback policy the parameter is not used and should not be set.
         Only values also present in
         :ref:`keys<envoy_v3_api_field_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.keys>` are allowed, but
         ``fallback_keys_subset`` cannot be equal to ``keys``.
         
        repeated string fallback_keys_subset = 3;
        Specified by:
        getFallbackKeysSubsetBytes in interface Cluster.LbSubsetConfig.LbSubsetSelectorOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the fallbackKeysSubset at the given index.
      • setFallbackKeysSubset

        public Cluster.LbSubsetConfig.LbSubsetSelector.Builder setFallbackKeysSubset​(int index,
                                                                                     String value)
         Subset of
         :ref:`keys<envoy_v3_api_field_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.keys>` used by
         :ref:`KEYS_SUBSET<envoy_v3_api_enum_value_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.LbSubsetSelectorFallbackPolicy.KEYS_SUBSET>`
         fallback policy.
         It has to be a non empty list if KEYS_SUBSET fallback policy is selected.
         For any other fallback policy the parameter is not used and should not be set.
         Only values also present in
         :ref:`keys<envoy_v3_api_field_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.keys>` are allowed, but
         ``fallback_keys_subset`` cannot be equal to ``keys``.
         
        repeated string fallback_keys_subset = 3;
        Parameters:
        index - The index to set the value at.
        value - The fallbackKeysSubset to set.
        Returns:
        This builder for chaining.
      • addFallbackKeysSubset

        public Cluster.LbSubsetConfig.LbSubsetSelector.Builder addFallbackKeysSubset​(String value)
         Subset of
         :ref:`keys<envoy_v3_api_field_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.keys>` used by
         :ref:`KEYS_SUBSET<envoy_v3_api_enum_value_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.LbSubsetSelectorFallbackPolicy.KEYS_SUBSET>`
         fallback policy.
         It has to be a non empty list if KEYS_SUBSET fallback policy is selected.
         For any other fallback policy the parameter is not used and should not be set.
         Only values also present in
         :ref:`keys<envoy_v3_api_field_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.keys>` are allowed, but
         ``fallback_keys_subset`` cannot be equal to ``keys``.
         
        repeated string fallback_keys_subset = 3;
        Parameters:
        value - The fallbackKeysSubset to add.
        Returns:
        This builder for chaining.
      • addAllFallbackKeysSubset

        public Cluster.LbSubsetConfig.LbSubsetSelector.Builder addAllFallbackKeysSubset​(Iterable<String> values)
         Subset of
         :ref:`keys<envoy_v3_api_field_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.keys>` used by
         :ref:`KEYS_SUBSET<envoy_v3_api_enum_value_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.LbSubsetSelectorFallbackPolicy.KEYS_SUBSET>`
         fallback policy.
         It has to be a non empty list if KEYS_SUBSET fallback policy is selected.
         For any other fallback policy the parameter is not used and should not be set.
         Only values also present in
         :ref:`keys<envoy_v3_api_field_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.keys>` are allowed, but
         ``fallback_keys_subset`` cannot be equal to ``keys``.
         
        repeated string fallback_keys_subset = 3;
        Parameters:
        values - The fallbackKeysSubset to add.
        Returns:
        This builder for chaining.
      • clearFallbackKeysSubset

        public Cluster.LbSubsetConfig.LbSubsetSelector.Builder clearFallbackKeysSubset()
         Subset of
         :ref:`keys<envoy_v3_api_field_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.keys>` used by
         :ref:`KEYS_SUBSET<envoy_v3_api_enum_value_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.LbSubsetSelectorFallbackPolicy.KEYS_SUBSET>`
         fallback policy.
         It has to be a non empty list if KEYS_SUBSET fallback policy is selected.
         For any other fallback policy the parameter is not used and should not be set.
         Only values also present in
         :ref:`keys<envoy_v3_api_field_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.keys>` are allowed, but
         ``fallback_keys_subset`` cannot be equal to ``keys``.
         
        repeated string fallback_keys_subset = 3;
        Returns:
        This builder for chaining.
      • addFallbackKeysSubsetBytes

        public Cluster.LbSubsetConfig.LbSubsetSelector.Builder addFallbackKeysSubsetBytes​(com.google.protobuf.ByteString value)
         Subset of
         :ref:`keys<envoy_v3_api_field_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.keys>` used by
         :ref:`KEYS_SUBSET<envoy_v3_api_enum_value_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.LbSubsetSelectorFallbackPolicy.KEYS_SUBSET>`
         fallback policy.
         It has to be a non empty list if KEYS_SUBSET fallback policy is selected.
         For any other fallback policy the parameter is not used and should not be set.
         Only values also present in
         :ref:`keys<envoy_v3_api_field_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.keys>` are allowed, but
         ``fallback_keys_subset`` cannot be equal to ``keys``.
         
        repeated string fallback_keys_subset = 3;
        Parameters:
        value - The bytes of the fallbackKeysSubset to add.
        Returns:
        This builder for chaining.