Class LoadBalancingPolicy.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<LoadBalancingPolicy.Builder>
com.google.protobuf.GeneratedMessage.Builder<LoadBalancingPolicy.Builder>
io.envoyproxy.envoy.config.cluster.v3.LoadBalancingPolicy.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,LoadBalancingPolicyOrBuilder
,Cloneable
- Enclosing class:
LoadBalancingPolicy
public static final class LoadBalancingPolicy.Builder
extends com.google.protobuf.GeneratedMessage.Builder<LoadBalancingPolicy.Builder>
implements LoadBalancingPolicyOrBuilder
Extensible load balancing policy configuration. Every LB policy defined via this mechanism will be identified via a unique name using reverse DNS notation. If the policy needs configuration parameters, it must define a message for its own configuration, which will be stored in the config field. The name of the policy will tell clients which type of message they should expect to see in the config field. Note that there are cases where it is useful to be able to independently select LB policies for choosing a locality and for choosing an endpoint within that locality. For example, a given deployment may always use the same policy to choose the locality, but for choosing the endpoint within the locality, some clusters may use weighted-round-robin, while others may use some sort of session-based balancing. This can be accomplished via hierarchical LB policies, where the parent LB policy creates a child LB policy for each locality. For each request, the parent chooses the locality and then delegates to the child policy for that locality to choose the endpoint within the locality. To facilitate this, the config message for the top-level LB policy may include a field of type LoadBalancingPolicy that specifies the child policy.Protobuf type
envoy.config.cluster.v3.LoadBalancingPolicy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private List
<LoadBalancingPolicy.Policy> private com.google.protobuf.RepeatedFieldBuilder
<LoadBalancingPolicy.Policy, LoadBalancingPolicy.Policy.Builder, LoadBalancingPolicy.PolicyOrBuilder> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllPolicies
(Iterable<? extends LoadBalancingPolicy.Policy> values) Each client will iterate over the list in order and stop at the first policy that it supports.addPolicies
(int index, LoadBalancingPolicy.Policy value) Each client will iterate over the list in order and stop at the first policy that it supports.addPolicies
(int index, LoadBalancingPolicy.Policy.Builder builderForValue) Each client will iterate over the list in order and stop at the first policy that it supports.Each client will iterate over the list in order and stop at the first policy that it supports.addPolicies
(LoadBalancingPolicy.Policy.Builder builderForValue) Each client will iterate over the list in order and stop at the first policy that it supports.Each client will iterate over the list in order and stop at the first policy that it supports.addPoliciesBuilder
(int index) Each client will iterate over the list in order and stop at the first policy that it supports.build()
private void
buildPartial0
(LoadBalancingPolicy result) private void
clear()
Each client will iterate over the list in order and stop at the first policy that it supports.private void
static final com.google.protobuf.Descriptors.Descriptor
com.google.protobuf.Descriptors.Descriptor
getPolicies
(int index) Each client will iterate over the list in order and stop at the first policy that it supports.getPoliciesBuilder
(int index) Each client will iterate over the list in order and stop at the first policy that it supports.Each client will iterate over the list in order and stop at the first policy that it supports.int
Each client will iterate over the list in order and stop at the first policy that it supports.private com.google.protobuf.RepeatedFieldBuilder
<LoadBalancingPolicy.Policy, LoadBalancingPolicy.Policy.Builder, LoadBalancingPolicy.PolicyOrBuilder> Each client will iterate over the list in order and stop at the first policy that it supports.getPoliciesOrBuilder
(int index) Each client will iterate over the list in order and stop at the first policy that it supports.List
<? extends LoadBalancingPolicy.PolicyOrBuilder> Each client will iterate over the list in order and stop at the first policy that it supports.protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
final boolean
mergeFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom
(com.google.protobuf.Message other) mergeFrom
(LoadBalancingPolicy other) removePolicies
(int index) Each client will iterate over the list in order and stop at the first policy that it supports.setPolicies
(int index, LoadBalancingPolicy.Policy value) Each client will iterate over the list in order and stop at the first policy that it supports.setPolicies
(int index, LoadBalancingPolicy.Policy.Builder builderForValue) Each client will iterate over the list in order and stop at the first policy that it supports.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, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, 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_ -
policies_
-
policiesBuilder_
private com.google.protobuf.RepeatedFieldBuilder<LoadBalancingPolicy.Policy,LoadBalancingPolicy.Policy.Builder, policiesBuilder_LoadBalancingPolicy.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() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessage.Builder<LoadBalancingPolicy.Builder>
-
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<LoadBalancingPolicy.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<LoadBalancingPolicy.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<LoadBalancingPolicy.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessage.Builder<LoadBalancingPolicy.Builder>
-
mergeFrom
public LoadBalancingPolicy.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<LoadBalancingPolicy.Builder>
- Throws:
IOException
-
ensurePoliciesIsMutable
private void ensurePoliciesIsMutable() -
getPoliciesList
Each client will iterate over the list in order and stop at the first policy that it supports. This provides a mechanism for starting to use new LB policies that are not yet supported by all clients.
repeated .envoy.config.cluster.v3.LoadBalancingPolicy.Policy policies = 1;
- Specified by:
getPoliciesList
in interfaceLoadBalancingPolicyOrBuilder
-
getPoliciesCount
public int getPoliciesCount()Each client will iterate over the list in order and stop at the first policy that it supports. This provides a mechanism for starting to use new LB policies that are not yet supported by all clients.
repeated .envoy.config.cluster.v3.LoadBalancingPolicy.Policy policies = 1;
- Specified by:
getPoliciesCount
in interfaceLoadBalancingPolicyOrBuilder
-
getPolicies
Each client will iterate over the list in order and stop at the first policy that it supports. This provides a mechanism for starting to use new LB policies that are not yet supported by all clients.
repeated .envoy.config.cluster.v3.LoadBalancingPolicy.Policy policies = 1;
- Specified by:
getPolicies
in interfaceLoadBalancingPolicyOrBuilder
-
setPolicies
Each client will iterate over the list in order and stop at the first policy that it supports. This provides a mechanism for starting to use new LB policies that are not yet supported by all clients.
repeated .envoy.config.cluster.v3.LoadBalancingPolicy.Policy policies = 1;
-
setPolicies
public LoadBalancingPolicy.Builder setPolicies(int index, LoadBalancingPolicy.Policy.Builder builderForValue) Each client will iterate over the list in order and stop at the first policy that it supports. This provides a mechanism for starting to use new LB policies that are not yet supported by all clients.
repeated .envoy.config.cluster.v3.LoadBalancingPolicy.Policy policies = 1;
-
addPolicies
Each client will iterate over the list in order and stop at the first policy that it supports. This provides a mechanism for starting to use new LB policies that are not yet supported by all clients.
repeated .envoy.config.cluster.v3.LoadBalancingPolicy.Policy policies = 1;
-
addPolicies
Each client will iterate over the list in order and stop at the first policy that it supports. This provides a mechanism for starting to use new LB policies that are not yet supported by all clients.
repeated .envoy.config.cluster.v3.LoadBalancingPolicy.Policy policies = 1;
-
addPolicies
Each client will iterate over the list in order and stop at the first policy that it supports. This provides a mechanism for starting to use new LB policies that are not yet supported by all clients.
repeated .envoy.config.cluster.v3.LoadBalancingPolicy.Policy policies = 1;
-
addPolicies
public LoadBalancingPolicy.Builder addPolicies(int index, LoadBalancingPolicy.Policy.Builder builderForValue) Each client will iterate over the list in order and stop at the first policy that it supports. This provides a mechanism for starting to use new LB policies that are not yet supported by all clients.
repeated .envoy.config.cluster.v3.LoadBalancingPolicy.Policy policies = 1;
-
addAllPolicies
public LoadBalancingPolicy.Builder addAllPolicies(Iterable<? extends LoadBalancingPolicy.Policy> values) Each client will iterate over the list in order and stop at the first policy that it supports. This provides a mechanism for starting to use new LB policies that are not yet supported by all clients.
repeated .envoy.config.cluster.v3.LoadBalancingPolicy.Policy policies = 1;
-
clearPolicies
Each client will iterate over the list in order and stop at the first policy that it supports. This provides a mechanism for starting to use new LB policies that are not yet supported by all clients.
repeated .envoy.config.cluster.v3.LoadBalancingPolicy.Policy policies = 1;
-
removePolicies
Each client will iterate over the list in order and stop at the first policy that it supports. This provides a mechanism for starting to use new LB policies that are not yet supported by all clients.
repeated .envoy.config.cluster.v3.LoadBalancingPolicy.Policy policies = 1;
-
getPoliciesBuilder
Each client will iterate over the list in order and stop at the first policy that it supports. This provides a mechanism for starting to use new LB policies that are not yet supported by all clients.
repeated .envoy.config.cluster.v3.LoadBalancingPolicy.Policy policies = 1;
-
getPoliciesOrBuilder
Each client will iterate over the list in order and stop at the first policy that it supports. This provides a mechanism for starting to use new LB policies that are not yet supported by all clients.
repeated .envoy.config.cluster.v3.LoadBalancingPolicy.Policy policies = 1;
- Specified by:
getPoliciesOrBuilder
in interfaceLoadBalancingPolicyOrBuilder
-
getPoliciesOrBuilderList
Each client will iterate over the list in order and stop at the first policy that it supports. This provides a mechanism for starting to use new LB policies that are not yet supported by all clients.
repeated .envoy.config.cluster.v3.LoadBalancingPolicy.Policy policies = 1;
- Specified by:
getPoliciesOrBuilderList
in interfaceLoadBalancingPolicyOrBuilder
-
addPoliciesBuilder
Each client will iterate over the list in order and stop at the first policy that it supports. This provides a mechanism for starting to use new LB policies that are not yet supported by all clients.
repeated .envoy.config.cluster.v3.LoadBalancingPolicy.Policy policies = 1;
-
addPoliciesBuilder
Each client will iterate over the list in order and stop at the first policy that it supports. This provides a mechanism for starting to use new LB policies that are not yet supported by all clients.
repeated .envoy.config.cluster.v3.LoadBalancingPolicy.Policy policies = 1;
-
getPoliciesBuilderList
Each client will iterate over the list in order and stop at the first policy that it supports. This provides a mechanism for starting to use new LB policies that are not yet supported by all clients.
repeated .envoy.config.cluster.v3.LoadBalancingPolicy.Policy policies = 1;
-
getPoliciesFieldBuilder
private com.google.protobuf.RepeatedFieldBuilder<LoadBalancingPolicy.Policy,LoadBalancingPolicy.Policy.Builder, getPoliciesFieldBuilder()LoadBalancingPolicy.PolicyOrBuilder>
-