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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private Object
private List
<LocalityLbEndpoints> private com.google.protobuf.RepeatedFieldBuilder
<LocalityLbEndpoints, LocalityLbEndpoints.Builder, LocalityLbEndpointsOrBuilder> private com.google.protobuf.MapFieldBuilder
<String, EndpointOrBuilder, Endpoint, Endpoint.Builder> private static final ClusterLoadAssignment.Builder.NamedEndpointsConverter
private ClusterLoadAssignment.Policy
private com.google.protobuf.SingleFieldBuilder
<ClusterLoadAssignment.Policy, ClusterLoadAssignment.Policy.Builder, ClusterLoadAssignment.PolicyOrBuilder> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllEndpoints
(Iterable<? extends LocalityLbEndpoints> values) List of endpoints to load balance to.addEndpoints
(int index, LocalityLbEndpoints value) List of endpoints to load balance to.addEndpoints
(int index, LocalityLbEndpoints.Builder builderForValue) List of endpoints to load balance to.addEndpoints
(LocalityLbEndpoints value) List of endpoints to load balance to.addEndpoints
(LocalityLbEndpoints.Builder builderForValue) List of endpoints to load balance to.List of endpoints to load balance to.addEndpointsBuilder
(int index) List of endpoints to load balance to.build()
private void
buildPartial0
(ClusterLoadAssignment result) private void
clear()
Name of the cluster.List of endpoints to load balance to.Load balancing policy settings.boolean
Map of named endpoints that can be referenced in LocalityLbEndpoints.private void
Name of the cluster.com.google.protobuf.ByteString
Name of the cluster.static final com.google.protobuf.Descriptors.Descriptor
com.google.protobuf.Descriptors.Descriptor
getEndpoints
(int index) List of endpoints to load balance to.getEndpointsBuilder
(int index) List of endpoints to load balance to.List of endpoints to load balance to.int
List of endpoints to load balance to.private com.google.protobuf.RepeatedFieldBuilder
<LocalityLbEndpoints, LocalityLbEndpoints.Builder, LocalityLbEndpointsOrBuilder> List of endpoints to load balance to.getEndpointsOrBuilder
(int index) List of endpoints to load balance to.List
<? extends LocalityLbEndpointsOrBuilder> List of endpoints to load balance to.Deprecated.Deprecated.int
Map of named endpoints that can be referenced in LocalityLbEndpoints.Map of named endpoints that can be referenced in LocalityLbEndpoints.getNamedEndpointsOrDefault
(String key, Endpoint defaultValue) Map of named endpoints that can be referenced in LocalityLbEndpoints.Map of named endpoints that can be referenced in LocalityLbEndpoints.Load balancing policy settings.Load balancing policy settings.private com.google.protobuf.SingleFieldBuilder
<ClusterLoadAssignment.Policy, ClusterLoadAssignment.Policy.Builder, ClusterLoadAssignment.PolicyOrBuilder> Load balancing policy settings.Load balancing policy settings.boolean
Load balancing policy settings.protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
protected com.google.protobuf.MapFieldReflectionAccessor
internalGetMapFieldReflection
(int number) protected com.google.protobuf.MapFieldReflectionAccessor
internalGetMutableMapFieldReflection
(int number) private com.google.protobuf.MapFieldBuilder
<String, EndpointOrBuilder, Endpoint, Endpoint.Builder> private com.google.protobuf.MapFieldBuilder
<String, EndpointOrBuilder, Endpoint, Endpoint.Builder> final boolean
private void
mergeFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom
(com.google.protobuf.Message other) mergeFrom
(ClusterLoadAssignment other) Load balancing policy settings.putAllNamedEndpoints
(Map<String, Endpoint> values) Map of named endpoints that can be referenced in LocalityLbEndpoints.putNamedEndpoints
(String key, Endpoint value) Map of named endpoints that can be referenced in LocalityLbEndpoints.Map of named endpoints that can be referenced in LocalityLbEndpoints.removeEndpoints
(int index) List of endpoints to load balance to.Map of named endpoints that can be referenced in LocalityLbEndpoints.setClusterName
(String value) Name of the cluster.setClusterNameBytes
(com.google.protobuf.ByteString value) Name of the cluster.setEndpoints
(int index, LocalityLbEndpoints value) List of endpoints to load balance to.setEndpoints
(int index, LocalityLbEndpoints.Builder builderForValue) List of endpoints to load balance to.Load balancing policy settings.setPolicy
(ClusterLoadAssignment.Policy.Builder builderForValue) Load balancing policy settings.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, 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
-
Field Details
-
bitField0_
private int bitField0_ -
clusterName_
-
endpoints_
-
endpointsBuilder_
private com.google.protobuf.RepeatedFieldBuilder<LocalityLbEndpoints,LocalityLbEndpoints.Builder, endpointsBuilder_LocalityLbEndpointsOrBuilder> -
namedEndpointsConverter
-
namedEndpoints_
private com.google.protobuf.MapFieldBuilder<String,EndpointOrBuilder, namedEndpoints_Endpoint, Endpoint.Builder> -
policy_
-
policyBuilder_
private com.google.protobuf.SingleFieldBuilder<ClusterLoadAssignment.Policy,ClusterLoadAssignment.Policy.Builder, policyBuilder_ClusterLoadAssignment.PolicyOrBuilder>
-
-
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 classcom.google.protobuf.GeneratedMessage.Builder<ClusterLoadAssignment.Builder>
-
internalGetMutableMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number) - Overrides:
internalGetMutableMapFieldReflection
in classcom.google.protobuf.GeneratedMessage.Builder<ClusterLoadAssignment.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessage.Builder<ClusterLoadAssignment.Builder>
-
maybeForceBuilderInitialization
private void maybeForceBuilderInitialization() -
clear
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessage.Builder<ClusterLoadAssignment.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessage.Builder<ClusterLoadAssignment.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartialRepeatedFields
-
buildPartial0
-
mergeFrom
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<ClusterLoadAssignment.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.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 interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<ClusterLoadAssignment.Builder>
- Throws:
IOException
-
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 interfaceClusterLoadAssignmentOrBuilder
- 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 interfaceClusterLoadAssignmentOrBuilder
- Returns:
- The bytes for clusterName.
-
setClusterName
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
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
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
List of endpoints to load balance to.
repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
- Specified by:
getEndpointsList
in interfaceClusterLoadAssignmentOrBuilder
-
getEndpointsCount
public int getEndpointsCount()List of endpoints to load balance to.
repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
- Specified by:
getEndpointsCount
in interfaceClusterLoadAssignmentOrBuilder
-
getEndpoints
List of endpoints to load balance to.
repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
- Specified by:
getEndpoints
in interfaceClusterLoadAssignmentOrBuilder
-
setEndpoints
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
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.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
List of endpoints to load balance to.
repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
-
removeEndpoints
List of endpoints to load balance to.
repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
-
getEndpointsBuilder
List of endpoints to load balance to.
repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
-
getEndpointsOrBuilder
List of endpoints to load balance to.
repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
- Specified by:
getEndpointsOrBuilder
in interfaceClusterLoadAssignmentOrBuilder
-
getEndpointsOrBuilderList
List of endpoints to load balance to.
repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
- Specified by:
getEndpointsOrBuilderList
in interfaceClusterLoadAssignmentOrBuilder
-
addEndpointsBuilder
List of endpoints to load balance to.
repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
-
addEndpointsBuilder
List of endpoints to load balance to.
repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
-
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, getEndpointsFieldBuilder()LocalityLbEndpointsOrBuilder> -
internalGetNamedEndpoints
private com.google.protobuf.MapFieldBuilder<String,EndpointOrBuilder, internalGetNamedEndpoints()Endpoint, Endpoint.Builder> -
internalGetMutableNamedEndpoints
private com.google.protobuf.MapFieldBuilder<String,EndpointOrBuilder, internalGetMutableNamedEndpoints()Endpoint, Endpoint.Builder> -
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 interfaceClusterLoadAssignmentOrBuilder
-
containsNamedEndpoints
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 interfaceClusterLoadAssignmentOrBuilder
-
getNamedEndpoints
Deprecated.UsegetNamedEndpointsMap()
instead.- Specified by:
getNamedEndpoints
in interfaceClusterLoadAssignmentOrBuilder
-
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 interfaceClusterLoadAssignmentOrBuilder
-
getNamedEndpointsOrDefault
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 interfaceClusterLoadAssignmentOrBuilder
-
getNamedEndpointsOrThrow
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 interfaceClusterLoadAssignmentOrBuilder
-
clearNamedEndpoints
-
removeNamedEndpoints
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.Use alternate mutation accessors instead. -
putNamedEndpoints
Map of named endpoints that can be referenced in LocalityLbEndpoints. [#not-implemented-hide:]
map<string, .envoy.config.endpoint.v3.Endpoint> named_endpoints = 5;
-
putAllNamedEndpoints
Map of named endpoints that can be referenced in LocalityLbEndpoints. [#not-implemented-hide:]
map<string, .envoy.config.endpoint.v3.Endpoint> named_endpoints = 5;
-
putNamedEndpointsBuilderIfAbsent
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 interfaceClusterLoadAssignmentOrBuilder
- Returns:
- Whether the policy field is set.
-
getPolicy
Load balancing policy settings.
.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy policy = 4;
- Specified by:
getPolicy
in interfaceClusterLoadAssignmentOrBuilder
- Returns:
- The policy.
-
setPolicy
Load balancing policy settings.
.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy policy = 4;
-
setPolicy
public ClusterLoadAssignment.Builder setPolicy(ClusterLoadAssignment.Policy.Builder builderForValue) 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
Load balancing policy settings.
.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy policy = 4;
-
getPolicyBuilder
Load balancing policy settings.
.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy policy = 4;
-
getPolicyOrBuilder
Load balancing policy settings.
.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy policy = 4;
- Specified by:
getPolicyOrBuilder
in interfaceClusterLoadAssignmentOrBuilder
-
getPolicyFieldBuilder
private com.google.protobuf.SingleFieldBuilder<ClusterLoadAssignment.Policy,ClusterLoadAssignment.Policy.Builder, getPolicyFieldBuilder()ClusterLoadAssignment.PolicyOrBuilder> Load balancing policy settings.
.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy policy = 4;
-