Class LoadBalancingPolicy.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- 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
,java.lang.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 typeenvoy.config.cluster.v3.LoadBalancingPolicy
-
-
Field Summary
Fields Modifier and Type Field Description private int
bitField0_
private java.util.List<LoadBalancingPolicy.Policy>
policies_
private com.google.protobuf.RepeatedFieldBuilder<LoadBalancingPolicy.Policy,LoadBalancingPolicy.Policy.Builder,LoadBalancingPolicy.PolicyOrBuilder>
policiesBuilder_
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LoadBalancingPolicy.Builder
addAllPolicies(java.lang.Iterable<? extends LoadBalancingPolicy.Policy> values)
Each client will iterate over the list in order and stop at the first policy that it supports.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.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.LoadBalancingPolicy.Builder
addPolicies(LoadBalancingPolicy.Policy value)
Each client will iterate over the list in order and stop at the first policy that it supports.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.LoadBalancingPolicy.Policy.Builder
addPoliciesBuilder()
Each client will iterate over the list in order and stop at the first policy that it supports.LoadBalancingPolicy.Policy.Builder
addPoliciesBuilder(int index)
Each client will iterate over the list in order and stop at the first policy that it supports.LoadBalancingPolicy
build()
LoadBalancingPolicy
buildPartial()
private void
buildPartial0(LoadBalancingPolicy result)
private void
buildPartialRepeatedFields(LoadBalancingPolicy result)
LoadBalancingPolicy.Builder
clear()
LoadBalancingPolicy.Builder
clearPolicies()
Each client will iterate over the list in order and stop at the first policy that it supports.private void
ensurePoliciesIsMutable()
LoadBalancingPolicy
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
LoadBalancingPolicy.Policy
getPolicies(int index)
Each client will iterate over the list in order and stop at the first policy that it supports.LoadBalancingPolicy.Policy.Builder
getPoliciesBuilder(int index)
Each client will iterate over the list in order and stop at the first policy that it supports.java.util.List<LoadBalancingPolicy.Policy.Builder>
getPoliciesBuilderList()
Each client will iterate over the list in order and stop at the first policy that it supports.int
getPoliciesCount()
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>
getPoliciesFieldBuilder()
java.util.List<LoadBalancingPolicy.Policy>
getPoliciesList()
Each client will iterate over the list in order and stop at the first policy that it supports.LoadBalancingPolicy.PolicyOrBuilder
getPoliciesOrBuilder(int index)
Each client will iterate over the list in order and stop at the first policy that it supports.java.util.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.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
LoadBalancingPolicy.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
LoadBalancingPolicy.Builder
mergeFrom(com.google.protobuf.Message other)
LoadBalancingPolicy.Builder
mergeFrom(LoadBalancingPolicy other)
LoadBalancingPolicy.Builder
removePolicies(int index)
Each client will iterate over the list in order and stop at the first policy that it supports.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.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.-
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
-
-
-
-
Field Detail
-
bitField0_
private int bitField0_
-
policies_
private java.util.List<LoadBalancingPolicy.Policy> policies_
-
policiesBuilder_
private com.google.protobuf.RepeatedFieldBuilder<LoadBalancingPolicy.Policy,LoadBalancingPolicy.Policy.Builder,LoadBalancingPolicy.PolicyOrBuilder> policiesBuilder_
-
-
Method Detail
-
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
public 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
public LoadBalancingPolicy getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public LoadBalancingPolicy build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public LoadBalancingPolicy buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartialRepeatedFields
private void buildPartialRepeatedFields(LoadBalancingPolicy result)
-
buildPartial0
private void buildPartial0(LoadBalancingPolicy result)
-
mergeFrom
public LoadBalancingPolicy.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<LoadBalancingPolicy.Builder>
-
mergeFrom
public LoadBalancingPolicy.Builder mergeFrom(LoadBalancingPolicy other)
-
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 java.io.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:
java.io.IOException
-
ensurePoliciesIsMutable
private void ensurePoliciesIsMutable()
-
getPoliciesList
public java.util.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:
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
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:
getPolicies
in 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(java.lang.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:
getPoliciesOrBuilder
in interfaceLoadBalancingPolicyOrBuilder
-
getPoliciesOrBuilderList
public java.util.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:
getPoliciesOrBuilderList
in 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 java.util.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;
-
getPoliciesFieldBuilder
private com.google.protobuf.RepeatedFieldBuilder<LoadBalancingPolicy.Policy,LoadBalancingPolicy.Policy.Builder,LoadBalancingPolicy.PolicyOrBuilder> getPoliciesFieldBuilder()
-
-