Class ClusterLoadAssignment.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<ClusterLoadAssignment.Builder>
com.google.protobuf.GeneratedMessage.Builder<ClusterLoadAssignment.Builder>
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, ClusterLoadAssignmentOrBuilder, Cloneable
Enclosing class:
ClusterLoadAssignment

public static final class ClusterLoadAssignment.Builder extends com.google.protobuf.GeneratedMessage.Builder<ClusterLoadAssignment.Builder> implements ClusterLoadAssignmentOrBuilder
 Each route from RDS will map to a single cluster or traffic split across
 clusters using weights expressed in the RDS WeightedCluster.

 With EDS, each cluster is treated independently from a LB perspective, with
 LB taking place between the Localities within a cluster and at a finer
 granularity between the hosts within a locality. The percentage of traffic
 for each endpoint is determined by both its load_balancing_weight, and the
 load_balancing_weight of its locality. First, a locality will be selected,
 then an endpoint within that locality will be chose based on its weight.
 [#next-free-field: 6]
 
Protobuf type envoy.config.endpoint.v3.ClusterLoadAssignment
  • Field Details

  • Constructor Details

    • Builder

      private Builder()
    • Builder

      private Builder(com.google.protobuf.AbstractMessage.BuilderParent parent)
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<ClusterLoadAssignment.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<ClusterLoadAssignment.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<ClusterLoadAssignment.Builder>
    • maybeForceBuilderInitialization

      private void maybeForceBuilderInitialization()
    • 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.GeneratedMessage.Builder<ClusterLoadAssignment.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.GeneratedMessage.Builder<ClusterLoadAssignment.Builder>
    • getDefaultInstanceForType

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

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

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

      private void buildPartialRepeatedFields(ClusterLoadAssignment result)
    • buildPartial0

      private void buildPartial0(ClusterLoadAssignment result)
    • mergeFrom

      public ClusterLoadAssignment.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<ClusterLoadAssignment.Builder>
    • mergeFrom

    • isInitialized

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

      public ClusterLoadAssignment.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<ClusterLoadAssignment.Builder>
      Throws:
      IOException
    • getClusterName

      public String getClusterName()
       Name of the cluster. This will be the :ref:`service_name
       <envoy_v3_api_field_config.cluster.v3.Cluster.EdsClusterConfig.service_name>` value if specified
       in the cluster :ref:`EdsClusterConfig
       <envoy_v3_api_msg_config.cluster.v3.Cluster.EdsClusterConfig>`.
       
      string cluster_name = 1 [(.validate.rules) = { ... }
      Specified by:
      getClusterName in interface ClusterLoadAssignmentOrBuilder
      Returns:
      The clusterName.
    • getClusterNameBytes

      public com.google.protobuf.ByteString getClusterNameBytes()
       Name of the cluster. This will be the :ref:`service_name
       <envoy_v3_api_field_config.cluster.v3.Cluster.EdsClusterConfig.service_name>` value if specified
       in the cluster :ref:`EdsClusterConfig
       <envoy_v3_api_msg_config.cluster.v3.Cluster.EdsClusterConfig>`.
       
      string cluster_name = 1 [(.validate.rules) = { ... }
      Specified by:
      getClusterNameBytes in interface ClusterLoadAssignmentOrBuilder
      Returns:
      The bytes for clusterName.
    • setClusterName

      public ClusterLoadAssignment.Builder setClusterName(String value)
       Name of the cluster. This will be the :ref:`service_name
       <envoy_v3_api_field_config.cluster.v3.Cluster.EdsClusterConfig.service_name>` value if specified
       in the cluster :ref:`EdsClusterConfig
       <envoy_v3_api_msg_config.cluster.v3.Cluster.EdsClusterConfig>`.
       
      string cluster_name = 1 [(.validate.rules) = { ... }
      Parameters:
      value - The clusterName to set.
      Returns:
      This builder for chaining.
    • clearClusterName

      public ClusterLoadAssignment.Builder clearClusterName()
       Name of the cluster. This will be the :ref:`service_name
       <envoy_v3_api_field_config.cluster.v3.Cluster.EdsClusterConfig.service_name>` value if specified
       in the cluster :ref:`EdsClusterConfig
       <envoy_v3_api_msg_config.cluster.v3.Cluster.EdsClusterConfig>`.
       
      string cluster_name = 1 [(.validate.rules) = { ... }
      Returns:
      This builder for chaining.
    • setClusterNameBytes

      public ClusterLoadAssignment.Builder setClusterNameBytes(com.google.protobuf.ByteString value)
       Name of the cluster. This will be the :ref:`service_name
       <envoy_v3_api_field_config.cluster.v3.Cluster.EdsClusterConfig.service_name>` value if specified
       in the cluster :ref:`EdsClusterConfig
       <envoy_v3_api_msg_config.cluster.v3.Cluster.EdsClusterConfig>`.
       
      string cluster_name = 1 [(.validate.rules) = { ... }
      Parameters:
      value - The bytes for clusterName to set.
      Returns:
      This builder for chaining.
    • ensureEndpointsIsMutable

      private void ensureEndpointsIsMutable()
    • getEndpointsList

      public List<LocalityLbEndpoints> getEndpointsList()
       List of endpoints to load balance to.
       
      repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
      Specified by:
      getEndpointsList in interface ClusterLoadAssignmentOrBuilder
    • getEndpointsCount

      public int getEndpointsCount()
       List of endpoints to load balance to.
       
      repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
      Specified by:
      getEndpointsCount in interface ClusterLoadAssignmentOrBuilder
    • getEndpoints

      public LocalityLbEndpoints getEndpoints(int index)
       List of endpoints to load balance to.
       
      repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
      Specified by:
      getEndpoints in interface ClusterLoadAssignmentOrBuilder
    • setEndpoints

      public ClusterLoadAssignment.Builder setEndpoints(int index, LocalityLbEndpoints value)
       List of endpoints to load balance to.
       
      repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
    • setEndpoints

      public ClusterLoadAssignment.Builder setEndpoints(int index, LocalityLbEndpoints.Builder builderForValue)
       List of endpoints to load balance to.
       
      repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
    • addEndpoints

       List of endpoints to load balance to.
       
      repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
    • addEndpoints

      public ClusterLoadAssignment.Builder addEndpoints(int index, LocalityLbEndpoints value)
       List of endpoints to load balance to.
       
      repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
    • addEndpoints

      public ClusterLoadAssignment.Builder addEndpoints(LocalityLbEndpoints.Builder builderForValue)
       List of endpoints to load balance to.
       
      repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
    • addEndpoints

      public ClusterLoadAssignment.Builder addEndpoints(int index, LocalityLbEndpoints.Builder builderForValue)
       List of endpoints to load balance to.
       
      repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
    • addAllEndpoints

      public ClusterLoadAssignment.Builder addAllEndpoints(Iterable<? extends LocalityLbEndpoints> values)
       List of endpoints to load balance to.
       
      repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
    • clearEndpoints

      public ClusterLoadAssignment.Builder clearEndpoints()
       List of endpoints to load balance to.
       
      repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
    • removeEndpoints

      public ClusterLoadAssignment.Builder removeEndpoints(int index)
       List of endpoints to load balance to.
       
      repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
    • getEndpointsBuilder

      public LocalityLbEndpoints.Builder getEndpointsBuilder(int index)
       List of endpoints to load balance to.
       
      repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
    • getEndpointsOrBuilder

      public LocalityLbEndpointsOrBuilder getEndpointsOrBuilder(int index)
       List of endpoints to load balance to.
       
      repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
      Specified by:
      getEndpointsOrBuilder in interface ClusterLoadAssignmentOrBuilder
    • getEndpointsOrBuilderList

      public List<? extends LocalityLbEndpointsOrBuilder> getEndpointsOrBuilderList()
       List of endpoints to load balance to.
       
      repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
      Specified by:
      getEndpointsOrBuilderList in interface ClusterLoadAssignmentOrBuilder
    • addEndpointsBuilder

      public LocalityLbEndpoints.Builder addEndpointsBuilder()
       List of endpoints to load balance to.
       
      repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
    • addEndpointsBuilder

      public LocalityLbEndpoints.Builder addEndpointsBuilder(int index)
       List of endpoints to load balance to.
       
      repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
    • getEndpointsBuilderList

      public List<LocalityLbEndpoints.Builder> getEndpointsBuilderList()
       List of endpoints to load balance to.
       
      repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
    • getEndpointsFieldBuilder

      private com.google.protobuf.RepeatedFieldBuilder<LocalityLbEndpoints,LocalityLbEndpoints.Builder,LocalityLbEndpointsOrBuilder> getEndpointsFieldBuilder()
    • internalGetNamedEndpoints

      private com.google.protobuf.MapFieldBuilder<String,EndpointOrBuilder,Endpoint,Endpoint.Builder> internalGetNamedEndpoints()
    • internalGetMutableNamedEndpoints

      private com.google.protobuf.MapFieldBuilder<String,EndpointOrBuilder,Endpoint,Endpoint.Builder> internalGetMutableNamedEndpoints()
    • getNamedEndpointsCount

      public int getNamedEndpointsCount()
      Description copied from interface: ClusterLoadAssignmentOrBuilder
       Map of named endpoints that can be referenced in LocalityLbEndpoints.
       [#not-implemented-hide:]
       
      map<string, .envoy.config.endpoint.v3.Endpoint> named_endpoints = 5;
      Specified by:
      getNamedEndpointsCount in interface ClusterLoadAssignmentOrBuilder
    • containsNamedEndpoints

      public boolean containsNamedEndpoints(String key)
       Map of named endpoints that can be referenced in LocalityLbEndpoints.
       [#not-implemented-hide:]
       
      map<string, .envoy.config.endpoint.v3.Endpoint> named_endpoints = 5;
      Specified by:
      containsNamedEndpoints in interface ClusterLoadAssignmentOrBuilder
    • getNamedEndpoints

      @Deprecated public Map<String,Endpoint> getNamedEndpoints()
      Deprecated.
      Specified by:
      getNamedEndpoints in interface ClusterLoadAssignmentOrBuilder
    • getNamedEndpointsMap

      public Map<String,Endpoint> getNamedEndpointsMap()
       Map of named endpoints that can be referenced in LocalityLbEndpoints.
       [#not-implemented-hide:]
       
      map<string, .envoy.config.endpoint.v3.Endpoint> named_endpoints = 5;
      Specified by:
      getNamedEndpointsMap in interface ClusterLoadAssignmentOrBuilder
    • getNamedEndpointsOrDefault

      public Endpoint getNamedEndpointsOrDefault(String key, Endpoint defaultValue)
       Map of named endpoints that can be referenced in LocalityLbEndpoints.
       [#not-implemented-hide:]
       
      map<string, .envoy.config.endpoint.v3.Endpoint> named_endpoints = 5;
      Specified by:
      getNamedEndpointsOrDefault in interface ClusterLoadAssignmentOrBuilder
    • getNamedEndpointsOrThrow

      public Endpoint getNamedEndpointsOrThrow(String key)
       Map of named endpoints that can be referenced in LocalityLbEndpoints.
       [#not-implemented-hide:]
       
      map<string, .envoy.config.endpoint.v3.Endpoint> named_endpoints = 5;
      Specified by:
      getNamedEndpointsOrThrow in interface ClusterLoadAssignmentOrBuilder
    • clearNamedEndpoints

      public ClusterLoadAssignment.Builder clearNamedEndpoints()
    • removeNamedEndpoints

      public ClusterLoadAssignment.Builder removeNamedEndpoints(String key)
       Map of named endpoints that can be referenced in LocalityLbEndpoints.
       [#not-implemented-hide:]
       
      map<string, .envoy.config.endpoint.v3.Endpoint> named_endpoints = 5;
    • getMutableNamedEndpoints

      @Deprecated public Map<String,Endpoint> getMutableNamedEndpoints()
      Deprecated.
      Use alternate mutation accessors instead.
    • putNamedEndpoints

      public ClusterLoadAssignment.Builder putNamedEndpoints(String key, Endpoint value)
       Map of named endpoints that can be referenced in LocalityLbEndpoints.
       [#not-implemented-hide:]
       
      map<string, .envoy.config.endpoint.v3.Endpoint> named_endpoints = 5;
    • putAllNamedEndpoints

      public ClusterLoadAssignment.Builder putAllNamedEndpoints(Map<String,Endpoint> values)
       Map of named endpoints that can be referenced in LocalityLbEndpoints.
       [#not-implemented-hide:]
       
      map<string, .envoy.config.endpoint.v3.Endpoint> named_endpoints = 5;
    • putNamedEndpointsBuilderIfAbsent

      public Endpoint.Builder putNamedEndpointsBuilderIfAbsent(String key)
       Map of named endpoints that can be referenced in LocalityLbEndpoints.
       [#not-implemented-hide:]
       
      map<string, .envoy.config.endpoint.v3.Endpoint> named_endpoints = 5;
    • hasPolicy

      public boolean hasPolicy()
       Load balancing policy settings.
       
      .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy policy = 4;
      Specified by:
      hasPolicy in interface ClusterLoadAssignmentOrBuilder
      Returns:
      Whether the policy field is set.
    • getPolicy

      public ClusterLoadAssignment.Policy getPolicy()
       Load balancing policy settings.
       
      .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy policy = 4;
      Specified by:
      getPolicy in interface ClusterLoadAssignmentOrBuilder
      Returns:
      The policy.
    • setPolicy

       Load balancing policy settings.
       
      .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy policy = 4;
    • setPolicy

       Load balancing policy settings.
       
      .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy policy = 4;
    • mergePolicy

       Load balancing policy settings.
       
      .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy policy = 4;
    • clearPolicy

      public ClusterLoadAssignment.Builder clearPolicy()
       Load balancing policy settings.
       
      .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy policy = 4;
    • getPolicyBuilder

      public ClusterLoadAssignment.Policy.Builder getPolicyBuilder()
       Load balancing policy settings.
       
      .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy policy = 4;
    • getPolicyOrBuilder

      public ClusterLoadAssignment.PolicyOrBuilder getPolicyOrBuilder()
       Load balancing policy settings.
       
      .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy policy = 4;
      Specified by:
      getPolicyOrBuilder in interface ClusterLoadAssignmentOrBuilder
    • getPolicyFieldBuilder

      private com.google.protobuf.SingleFieldBuilder<ClusterLoadAssignment.Policy,ClusterLoadAssignment.Policy.Builder,ClusterLoadAssignment.PolicyOrBuilder> getPolicyFieldBuilder()
       Load balancing policy settings.
       
      .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy policy = 4;