Class LoadBalancingPolicy.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderType>
-
- com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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 typeenvoy.config.cluster.v3.LoadBalancingPolicy
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LoadBalancingPolicy.BuilderaddAllPolicies(Iterable<? extends LoadBalancingPolicy.Policy> values)Each client will iterate over the list in order and stop at the first policy that it supports.LoadBalancingPolicy.BuilderaddPolicies(int index, LoadBalancingPolicy.Policy value)Each client will iterate over the list in order and stop at the first policy that it supports.LoadBalancingPolicy.BuilderaddPolicies(int index, LoadBalancingPolicy.Policy.Builder builderForValue)Each client will iterate over the list in order and stop at the first policy that it supports.LoadBalancingPolicy.BuilderaddPolicies(LoadBalancingPolicy.Policy value)Each client will iterate over the list in order and stop at the first policy that it supports.LoadBalancingPolicy.BuilderaddPolicies(LoadBalancingPolicy.Policy.Builder builderForValue)Each client will iterate over the list in order and stop at the first policy that it supports.LoadBalancingPolicy.Policy.BuilderaddPoliciesBuilder()Each client will iterate over the list in order and stop at the first policy that it supports.LoadBalancingPolicy.Policy.BuilderaddPoliciesBuilder(int index)Each client will iterate over the list in order and stop at the first policy that it supports.LoadBalancingPolicy.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)LoadBalancingPolicybuild()LoadBalancingPolicybuildPartial()LoadBalancingPolicy.Builderclear()LoadBalancingPolicy.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)LoadBalancingPolicy.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)LoadBalancingPolicy.BuilderclearPolicies()Each client will iterate over the list in order and stop at the first policy that it supports.LoadBalancingPolicy.Builderclone()LoadBalancingPolicygetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()LoadBalancingPolicy.PolicygetPolicies(int index)Each client will iterate over the list in order and stop at the first policy that it supports.LoadBalancingPolicy.Policy.BuildergetPoliciesBuilder(int index)Each client will iterate over the list in order and stop at the first policy that it supports.List<LoadBalancingPolicy.Policy.Builder>getPoliciesBuilderList()Each client will iterate over the list in order and stop at the first policy that it supports.intgetPoliciesCount()Each client will iterate over the list in order and stop at the first policy that it supports.List<LoadBalancingPolicy.Policy>getPoliciesList()Each client will iterate over the list in order and stop at the first policy that it supports.LoadBalancingPolicy.PolicyOrBuildergetPoliciesOrBuilder(int index)Each client will iterate over the list in order and stop at the first policy that it supports.List<? extends LoadBalancingPolicy.PolicyOrBuilder>getPoliciesOrBuilderList()Each client will iterate over the list in order and stop at the first policy that it supports.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()LoadBalancingPolicy.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)LoadBalancingPolicy.BuildermergeFrom(com.google.protobuf.Message other)LoadBalancingPolicy.BuildermergeFrom(LoadBalancingPolicy other)LoadBalancingPolicy.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)LoadBalancingPolicy.BuilderremovePolicies(int index)Each client will iterate over the list in order and stop at the first policy that it supports.LoadBalancingPolicy.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)LoadBalancingPolicy.BuildersetPolicies(int index, LoadBalancingPolicy.Policy value)Each client will iterate over the list in order and stop at the first policy that it supports.LoadBalancingPolicy.BuildersetPolicies(int index, LoadBalancingPolicy.Policy.Builder builderForValue)Each client will iterate over the list in order and stop at the first policy that it supports.LoadBalancingPolicy.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)LoadBalancingPolicy.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, 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
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<LoadBalancingPolicy.Builder>
-
clear
public LoadBalancingPolicy.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<LoadBalancingPolicy.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<LoadBalancingPolicy.Builder>
-
getDefaultInstanceForType
public LoadBalancingPolicy getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public LoadBalancingPolicy build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public LoadBalancingPolicy buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public LoadBalancingPolicy.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<LoadBalancingPolicy.Builder>
-
setField
public LoadBalancingPolicy.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<LoadBalancingPolicy.Builder>
-
clearField
public LoadBalancingPolicy.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<LoadBalancingPolicy.Builder>
-
clearOneof
public LoadBalancingPolicy.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<LoadBalancingPolicy.Builder>
-
setRepeatedField
public LoadBalancingPolicy.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<LoadBalancingPolicy.Builder>
-
addRepeatedField
public LoadBalancingPolicy.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<LoadBalancingPolicy.Builder>
-
mergeFrom
public LoadBalancingPolicy.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<LoadBalancingPolicy.Builder>
-
mergeFrom
public LoadBalancingPolicy.Builder mergeFrom(LoadBalancingPolicy other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<LoadBalancingPolicy.Builder>
-
mergeFrom
public LoadBalancingPolicy.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<LoadBalancingPolicy.Builder>- Throws:
IOException
-
getPoliciesList
public List<LoadBalancingPolicy.Policy> 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:
getPoliciesListin 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:
getPoliciesCountin interfaceLoadBalancingPolicyOrBuilder
-
getPolicies
public LoadBalancingPolicy.Policy getPolicies(int index)
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:
getPoliciesin interfaceLoadBalancingPolicyOrBuilder
-
setPolicies
public LoadBalancingPolicy.Builder setPolicies(int index, LoadBalancingPolicy.Policy value)
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
public LoadBalancingPolicy.Builder addPolicies(LoadBalancingPolicy.Policy value)
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 value)
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(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
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
public LoadBalancingPolicy.Builder 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
public LoadBalancingPolicy.Builder removePolicies(int index)
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
public LoadBalancingPolicy.Policy.Builder getPoliciesBuilder(int index)
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
public LoadBalancingPolicy.PolicyOrBuilder getPoliciesOrBuilder(int index)
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:
getPoliciesOrBuilderin interfaceLoadBalancingPolicyOrBuilder
-
getPoliciesOrBuilderList
public List<? extends LoadBalancingPolicy.PolicyOrBuilder> 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:
getPoliciesOrBuilderListin interfaceLoadBalancingPolicyOrBuilder
-
addPoliciesBuilder
public LoadBalancingPolicy.Policy.Builder 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
public LoadBalancingPolicy.Policy.Builder addPoliciesBuilder(int index)
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
public List<LoadBalancingPolicy.Policy.Builder> 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;
-
setUnknownFields
public final LoadBalancingPolicy.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<LoadBalancingPolicy.Builder>
-
mergeUnknownFields
public final LoadBalancingPolicy.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<LoadBalancingPolicy.Builder>
-
-