Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/config/endpoint/v3/endpoint.proto
package io.envoyproxy.envoy.config.endpoint.v3;
/**
*
* 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 {@code envoy.config.endpoint.v3.ClusterLoadAssignment}
*/
public final class ClusterLoadAssignment extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.endpoint.v3.ClusterLoadAssignment)
ClusterLoadAssignmentOrBuilder {
private static final long serialVersionUID = 0L;
// Use ClusterLoadAssignment.newBuilder() to construct.
private ClusterLoadAssignment(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ClusterLoadAssignment() {
clusterName_ = "";
endpoints_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ClusterLoadAssignment();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ClusterLoadAssignment(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
clusterName_ = s;
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
endpoints_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
endpoints_.add(
input.readMessage(io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.parser(), extensionRegistry));
break;
}
case 34: {
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.Builder subBuilder = null;
if (policy_ != null) {
subBuilder = policy_.toBuilder();
}
policy_ = input.readMessage(io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(policy_);
policy_ = subBuilder.buildPartial();
}
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
namedEndpoints_ = com.google.protobuf.MapField.newMapField(
NamedEndpointsDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000002;
}
com.google.protobuf.MapEntry
namedEndpoints__ = input.readMessage(
NamedEndpointsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
namedEndpoints_.getMutableMap().put(
namedEndpoints__.getKey(), namedEndpoints__.getValue());
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
endpoints_ = java.util.Collections.unmodifiableList(endpoints_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.endpoint.v3.EndpointProto.internal_static_envoy_config_endpoint_v3_ClusterLoadAssignment_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 5:
return internalGetNamedEndpoints();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.endpoint.v3.EndpointProto.internal_static_envoy_config_endpoint_v3_ClusterLoadAssignment_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.class, io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Builder.class);
}
public interface PolicyOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.config.endpoint.v3.ClusterLoadAssignment.Policy)
com.google.protobuf.MessageOrBuilder {
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
* .. code-block:: json
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
* .. code-block:: json
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
* .. code-block:: json
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
* .. code-block:: json
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
* .. code-block:: json
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* Priority levels and localities are considered overprovisioned with this
* factor (in percentage). This means that we don't consider a priority
* level or locality unhealthy until the fraction of healthy hosts
* multiplied by the overprovisioning factor drops below 100.
* With the default value 140(1.4), Envoy doesn't consider a priority level
* or a locality unhealthy until their percentage of healthy hosts drops
* below 72%. For example:
* .. code-block:: json
* { "overprovisioning_factor": 100 }
* Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
* :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
*
*
* .google.protobuf.UInt32Value overprovisioning_factor = 3 [(.validate.rules) = { ... }
* @return Whether the overprovisioningFactor field is set.
*/
boolean hasOverprovisioningFactor();
/**
*
* Priority levels and localities are considered overprovisioned with this
* factor (in percentage). This means that we don't consider a priority
* level or locality unhealthy until the fraction of healthy hosts
* multiplied by the overprovisioning factor drops below 100.
* With the default value 140(1.4), Envoy doesn't consider a priority level
* or a locality unhealthy until their percentage of healthy hosts drops
* below 72%. For example:
* .. code-block:: json
* { "overprovisioning_factor": 100 }
* Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
* :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
*
* Priority levels and localities are considered overprovisioned with this
* factor (in percentage). This means that we don't consider a priority
* level or locality unhealthy until the fraction of healthy hosts
* multiplied by the overprovisioning factor drops below 100.
* With the default value 140(1.4), Envoy doesn't consider a priority level
* or a locality unhealthy until their percentage of healthy hosts drops
* below 72%. For example:
* .. code-block:: json
* { "overprovisioning_factor": 100 }
* Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
* :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
*
* The max time until which the endpoints from this assignment can be used.
* If no new assignments are received before this time expires the endpoints
* are considered stale and should be marked unhealthy.
* Defaults to 0 which means endpoints never go stale.
*
*
* .google.protobuf.Duration endpoint_stale_after = 4 [(.validate.rules) = { ... }
* @return Whether the endpointStaleAfter field is set.
*/
boolean hasEndpointStaleAfter();
/**
*
* The max time until which the endpoints from this assignment can be used.
* If no new assignments are received before this time expires the endpoints
* are considered stale and should be marked unhealthy.
* Defaults to 0 which means endpoints never go stale.
*
* The max time until which the endpoints from this assignment can be used.
* If no new assignments are received before this time expires the endpoints
* are considered stale and should be marked unhealthy.
* Defaults to 0 which means endpoints never go stale.
*
* If true, use the :ref:`load balancing weight
* <envoy_v3_api_field_config.endpoint.v3.LbEndpoint.load_balancing_weight>` of healthy and unhealthy
* hosts to determine the health of the priority level. If false, use the number of healthy and unhealthy hosts
* to determine the health of the priority level, or in other words assume each host has a weight of 1 for
* this calculation.
* Note: this is not currently implemented for
* :ref:`locality weighted load balancing <arch_overview_load_balancing_locality_weighted_lb>`.
*
* Percentage of traffic that should be dropped for the category.
*
*
* .envoy.type.v3.FractionalPercent drop_percentage = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.type.v3.FractionalPercent, io.envoyproxy.envoy.type.v3.FractionalPercent.Builder, io.envoyproxy.envoy.type.v3.FractionalPercentOrBuilder>
getDropPercentageFieldBuilder() {
if (dropPercentageBuilder_ == null) {
dropPercentageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.type.v3.FractionalPercent, io.envoyproxy.envoy.type.v3.FractionalPercent.Builder, io.envoyproxy.envoy.type.v3.FractionalPercentOrBuilder>(
getDropPercentage(),
getParentForChildren(),
isClean());
dropPercentage_ = null;
}
return dropPercentageBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload)
}
// @@protoc_insertion_point(class_scope:envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload)
private static final io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload();
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DropOverload parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new DropOverload(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int DROP_OVERLOADS_FIELD_NUMBER = 2;
private java.util.List dropOverloads_;
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
* .. code-block:: json
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
* .. code-block:: json
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
* .. code-block:: json
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
@java.lang.Override
public int getDropOverloadsCount() {
return dropOverloads_.size();
}
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
* .. code-block:: json
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
* .. code-block:: json
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverloadOrBuilder getDropOverloadsOrBuilder(
int index) {
return dropOverloads_.get(index);
}
public static final int OVERPROVISIONING_FACTOR_FIELD_NUMBER = 3;
private com.google.protobuf.UInt32Value overprovisioningFactor_;
/**
*
* Priority levels and localities are considered overprovisioned with this
* factor (in percentage). This means that we don't consider a priority
* level or locality unhealthy until the fraction of healthy hosts
* multiplied by the overprovisioning factor drops below 100.
* With the default value 140(1.4), Envoy doesn't consider a priority level
* or a locality unhealthy until their percentage of healthy hosts drops
* below 72%. For example:
* .. code-block:: json
* { "overprovisioning_factor": 100 }
* Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
* :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
*
*
* .google.protobuf.UInt32Value overprovisioning_factor = 3 [(.validate.rules) = { ... }
* @return Whether the overprovisioningFactor field is set.
*/
@java.lang.Override
public boolean hasOverprovisioningFactor() {
return overprovisioningFactor_ != null;
}
/**
*
* Priority levels and localities are considered overprovisioned with this
* factor (in percentage). This means that we don't consider a priority
* level or locality unhealthy until the fraction of healthy hosts
* multiplied by the overprovisioning factor drops below 100.
* With the default value 140(1.4), Envoy doesn't consider a priority level
* or a locality unhealthy until their percentage of healthy hosts drops
* below 72%. For example:
* .. code-block:: json
* { "overprovisioning_factor": 100 }
* Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
* :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
*
* Priority levels and localities are considered overprovisioned with this
* factor (in percentage). This means that we don't consider a priority
* level or locality unhealthy until the fraction of healthy hosts
* multiplied by the overprovisioning factor drops below 100.
* With the default value 140(1.4), Envoy doesn't consider a priority level
* or a locality unhealthy until their percentage of healthy hosts drops
* below 72%. For example:
* .. code-block:: json
* { "overprovisioning_factor": 100 }
* Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
* :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
*
*
* .google.protobuf.UInt32Value overprovisioning_factor = 3 [(.validate.rules) = { ... }
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getOverprovisioningFactorOrBuilder() {
return getOverprovisioningFactor();
}
public static final int ENDPOINT_STALE_AFTER_FIELD_NUMBER = 4;
private com.google.protobuf.Duration endpointStaleAfter_;
/**
*
* The max time until which the endpoints from this assignment can be used.
* If no new assignments are received before this time expires the endpoints
* are considered stale and should be marked unhealthy.
* Defaults to 0 which means endpoints never go stale.
*
*
* .google.protobuf.Duration endpoint_stale_after = 4 [(.validate.rules) = { ... }
* @return Whether the endpointStaleAfter field is set.
*/
@java.lang.Override
public boolean hasEndpointStaleAfter() {
return endpointStaleAfter_ != null;
}
/**
*
* The max time until which the endpoints from this assignment can be used.
* If no new assignments are received before this time expires the endpoints
* are considered stale and should be marked unhealthy.
* Defaults to 0 which means endpoints never go stale.
*
* The max time until which the endpoints from this assignment can be used.
* If no new assignments are received before this time expires the endpoints
* are considered stale and should be marked unhealthy.
* Defaults to 0 which means endpoints never go stale.
*
*
* .google.protobuf.Duration endpoint_stale_after = 4 [(.validate.rules) = { ... }
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getEndpointStaleAfterOrBuilder() {
return getEndpointStaleAfter();
}
public static final int WEIGHTED_PRIORITY_HEALTH_FIELD_NUMBER = 6;
private boolean weightedPriorityHealth_;
/**
*
* If true, use the :ref:`load balancing weight
* <envoy_v3_api_field_config.endpoint.v3.LbEndpoint.load_balancing_weight>` of healthy and unhealthy
* hosts to determine the health of the priority level. If false, use the number of healthy and unhealthy hosts
* to determine the health of the priority level, or in other words assume each host has a weight of 1 for
* this calculation.
* Note: this is not currently implemented for
* :ref:`locality weighted load balancing <arch_overview_load_balancing_locality_weighted_lb>`.
*
*
* bool weighted_priority_health = 6;
* @return The weightedPriorityHealth.
*/
@java.lang.Override
public boolean getWeightedPriorityHealth() {
return weightedPriorityHealth_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < dropOverloads_.size(); i++) {
output.writeMessage(2, dropOverloads_.get(i));
}
if (overprovisioningFactor_ != null) {
output.writeMessage(3, getOverprovisioningFactor());
}
if (endpointStaleAfter_ != null) {
output.writeMessage(4, getEndpointStaleAfter());
}
if (weightedPriorityHealth_ != false) {
output.writeBool(6, weightedPriorityHealth_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < dropOverloads_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, dropOverloads_.get(i));
}
if (overprovisioningFactor_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getOverprovisioningFactor());
}
if (endpointStaleAfter_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getEndpointStaleAfter());
}
if (weightedPriorityHealth_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(6, weightedPriorityHealth_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy other = (io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy) obj;
if (!getDropOverloadsList()
.equals(other.getDropOverloadsList())) return false;
if (hasOverprovisioningFactor() != other.hasOverprovisioningFactor()) return false;
if (hasOverprovisioningFactor()) {
if (!getOverprovisioningFactor()
.equals(other.getOverprovisioningFactor())) return false;
}
if (hasEndpointStaleAfter() != other.hasEndpointStaleAfter()) return false;
if (hasEndpointStaleAfter()) {
if (!getEndpointStaleAfter()
.equals(other.getEndpointStaleAfter())) return false;
}
if (getWeightedPriorityHealth()
!= other.getWeightedPriorityHealth()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getDropOverloadsCount() > 0) {
hash = (37 * hash) + DROP_OVERLOADS_FIELD_NUMBER;
hash = (53 * hash) + getDropOverloadsList().hashCode();
}
if (hasOverprovisioningFactor()) {
hash = (37 * hash) + OVERPROVISIONING_FACTOR_FIELD_NUMBER;
hash = (53 * hash) + getOverprovisioningFactor().hashCode();
}
if (hasEndpointStaleAfter()) {
hash = (37 * hash) + ENDPOINT_STALE_AFTER_FIELD_NUMBER;
hash = (53 * hash) + getEndpointStaleAfter().hashCode();
}
hash = (37 * hash) + WEIGHTED_PRIORITY_HEALTH_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getWeightedPriorityHealth());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
* .. code-block:: json
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
* .. code-block:: json
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
public int getDropOverloadsCount() {
if (dropOverloadsBuilder_ == null) {
return dropOverloads_.size();
} else {
return dropOverloadsBuilder_.getCount();
}
}
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
* .. code-block:: json
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
* .. code-block:: json
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
public Builder setDropOverloads(
int index, io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload value) {
if (dropOverloadsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDropOverloadsIsMutable();
dropOverloads_.set(index, value);
onChanged();
} else {
dropOverloadsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
* .. code-block:: json
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
* .. code-block:: json
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
public Builder addDropOverloads(io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload value) {
if (dropOverloadsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDropOverloadsIsMutable();
dropOverloads_.add(value);
onChanged();
} else {
dropOverloadsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
* .. code-block:: json
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
public Builder addDropOverloads(
int index, io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload value) {
if (dropOverloadsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDropOverloadsIsMutable();
dropOverloads_.add(index, value);
onChanged();
} else {
dropOverloadsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
* .. code-block:: json
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
* .. code-block:: json
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
* .. code-block:: json
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
* .. code-block:: json
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
* .. code-block:: json
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
* .. code-block:: json
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload.Builder getDropOverloadsBuilder(
int index) {
return getDropOverloadsFieldBuilder().getBuilder(index);
}
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
* .. code-block:: json
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverloadOrBuilder getDropOverloadsOrBuilder(
int index) {
if (dropOverloadsBuilder_ == null) {
return dropOverloads_.get(index); } else {
return dropOverloadsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
* .. code-block:: json
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
* .. code-block:: json
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
* .. code-block:: json
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
* .. code-block:: json
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* Priority levels and localities are considered overprovisioned with this
* factor (in percentage). This means that we don't consider a priority
* level or locality unhealthy until the fraction of healthy hosts
* multiplied by the overprovisioning factor drops below 100.
* With the default value 140(1.4), Envoy doesn't consider a priority level
* or a locality unhealthy until their percentage of healthy hosts drops
* below 72%. For example:
* .. code-block:: json
* { "overprovisioning_factor": 100 }
* Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
* :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
*
*
* .google.protobuf.UInt32Value overprovisioning_factor = 3 [(.validate.rules) = { ... }
* @return Whether the overprovisioningFactor field is set.
*/
public boolean hasOverprovisioningFactor() {
return overprovisioningFactorBuilder_ != null || overprovisioningFactor_ != null;
}
/**
*
* Priority levels and localities are considered overprovisioned with this
* factor (in percentage). This means that we don't consider a priority
* level or locality unhealthy until the fraction of healthy hosts
* multiplied by the overprovisioning factor drops below 100.
* With the default value 140(1.4), Envoy doesn't consider a priority level
* or a locality unhealthy until their percentage of healthy hosts drops
* below 72%. For example:
* .. code-block:: json
* { "overprovisioning_factor": 100 }
* Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
* :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
*
* Priority levels and localities are considered overprovisioned with this
* factor (in percentage). This means that we don't consider a priority
* level or locality unhealthy until the fraction of healthy hosts
* multiplied by the overprovisioning factor drops below 100.
* With the default value 140(1.4), Envoy doesn't consider a priority level
* or a locality unhealthy until their percentage of healthy hosts drops
* below 72%. For example:
* .. code-block:: json
* { "overprovisioning_factor": 100 }
* Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
* :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
*
* Priority levels and localities are considered overprovisioned with this
* factor (in percentage). This means that we don't consider a priority
* level or locality unhealthy until the fraction of healthy hosts
* multiplied by the overprovisioning factor drops below 100.
* With the default value 140(1.4), Envoy doesn't consider a priority level
* or a locality unhealthy until their percentage of healthy hosts drops
* below 72%. For example:
* .. code-block:: json
* { "overprovisioning_factor": 100 }
* Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
* :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
*
* Priority levels and localities are considered overprovisioned with this
* factor (in percentage). This means that we don't consider a priority
* level or locality unhealthy until the fraction of healthy hosts
* multiplied by the overprovisioning factor drops below 100.
* With the default value 140(1.4), Envoy doesn't consider a priority level
* or a locality unhealthy until their percentage of healthy hosts drops
* below 72%. For example:
* .. code-block:: json
* { "overprovisioning_factor": 100 }
* Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
* :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
*
* Priority levels and localities are considered overprovisioned with this
* factor (in percentage). This means that we don't consider a priority
* level or locality unhealthy until the fraction of healthy hosts
* multiplied by the overprovisioning factor drops below 100.
* With the default value 140(1.4), Envoy doesn't consider a priority level
* or a locality unhealthy until their percentage of healthy hosts drops
* below 72%. For example:
* .. code-block:: json
* { "overprovisioning_factor": 100 }
* Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
* :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
*
* Priority levels and localities are considered overprovisioned with this
* factor (in percentage). This means that we don't consider a priority
* level or locality unhealthy until the fraction of healthy hosts
* multiplied by the overprovisioning factor drops below 100.
* With the default value 140(1.4), Envoy doesn't consider a priority level
* or a locality unhealthy until their percentage of healthy hosts drops
* below 72%. For example:
* .. code-block:: json
* { "overprovisioning_factor": 100 }
* Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
* :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
*
* Priority levels and localities are considered overprovisioned with this
* factor (in percentage). This means that we don't consider a priority
* level or locality unhealthy until the fraction of healthy hosts
* multiplied by the overprovisioning factor drops below 100.
* With the default value 140(1.4), Envoy doesn't consider a priority level
* or a locality unhealthy until their percentage of healthy hosts drops
* below 72%. For example:
* .. code-block:: json
* { "overprovisioning_factor": 100 }
* Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
* :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
*
* Priority levels and localities are considered overprovisioned with this
* factor (in percentage). This means that we don't consider a priority
* level or locality unhealthy until the fraction of healthy hosts
* multiplied by the overprovisioning factor drops below 100.
* With the default value 140(1.4), Envoy doesn't consider a priority level
* or a locality unhealthy until their percentage of healthy hosts drops
* below 72%. For example:
* .. code-block:: json
* { "overprovisioning_factor": 100 }
* Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
* :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
*
* The max time until which the endpoints from this assignment can be used.
* If no new assignments are received before this time expires the endpoints
* are considered stale and should be marked unhealthy.
* Defaults to 0 which means endpoints never go stale.
*
*
* .google.protobuf.Duration endpoint_stale_after = 4 [(.validate.rules) = { ... }
* @return Whether the endpointStaleAfter field is set.
*/
public boolean hasEndpointStaleAfter() {
return endpointStaleAfterBuilder_ != null || endpointStaleAfter_ != null;
}
/**
*
* The max time until which the endpoints from this assignment can be used.
* If no new assignments are received before this time expires the endpoints
* are considered stale and should be marked unhealthy.
* Defaults to 0 which means endpoints never go stale.
*
* The max time until which the endpoints from this assignment can be used.
* If no new assignments are received before this time expires the endpoints
* are considered stale and should be marked unhealthy.
* Defaults to 0 which means endpoints never go stale.
*
* The max time until which the endpoints from this assignment can be used.
* If no new assignments are received before this time expires the endpoints
* are considered stale and should be marked unhealthy.
* Defaults to 0 which means endpoints never go stale.
*
* The max time until which the endpoints from this assignment can be used.
* If no new assignments are received before this time expires the endpoints
* are considered stale and should be marked unhealthy.
* Defaults to 0 which means endpoints never go stale.
*
* The max time until which the endpoints from this assignment can be used.
* If no new assignments are received before this time expires the endpoints
* are considered stale and should be marked unhealthy.
* Defaults to 0 which means endpoints never go stale.
*
* The max time until which the endpoints from this assignment can be used.
* If no new assignments are received before this time expires the endpoints
* are considered stale and should be marked unhealthy.
* Defaults to 0 which means endpoints never go stale.
*
* The max time until which the endpoints from this assignment can be used.
* If no new assignments are received before this time expires the endpoints
* are considered stale and should be marked unhealthy.
* Defaults to 0 which means endpoints never go stale.
*
* The max time until which the endpoints from this assignment can be used.
* If no new assignments are received before this time expires the endpoints
* are considered stale and should be marked unhealthy.
* Defaults to 0 which means endpoints never go stale.
*
* If true, use the :ref:`load balancing weight
* <envoy_v3_api_field_config.endpoint.v3.LbEndpoint.load_balancing_weight>` of healthy and unhealthy
* hosts to determine the health of the priority level. If false, use the number of healthy and unhealthy hosts
* to determine the health of the priority level, or in other words assume each host has a weight of 1 for
* this calculation.
* Note: this is not currently implemented for
* :ref:`locality weighted load balancing <arch_overview_load_balancing_locality_weighted_lb>`.
*
* If true, use the :ref:`load balancing weight
* <envoy_v3_api_field_config.endpoint.v3.LbEndpoint.load_balancing_weight>` of healthy and unhealthy
* hosts to determine the health of the priority level. If false, use the number of healthy and unhealthy hosts
* to determine the health of the priority level, or in other words assume each host has a weight of 1 for
* this calculation.
* Note: this is not currently implemented for
* :ref:`locality weighted load balancing <arch_overview_load_balancing_locality_weighted_lb>`.
*
*
* bool weighted_priority_health = 6;
* @param value The weightedPriorityHealth to set.
* @return This builder for chaining.
*/
public Builder setWeightedPriorityHealth(boolean value) {
weightedPriorityHealth_ = value;
onChanged();
return this;
}
/**
*
* If true, use the :ref:`load balancing weight
* <envoy_v3_api_field_config.endpoint.v3.LbEndpoint.load_balancing_weight>` of healthy and unhealthy
* hosts to determine the health of the priority level. If false, use the number of healthy and unhealthy hosts
* to determine the health of the priority level, or in other words assume each host has a weight of 1 for
* this calculation.
* Note: this is not currently implemented for
* :ref:`locality weighted load balancing <arch_overview_load_balancing_locality_weighted_lb>`.
*
*
* bool weighted_priority_health = 6;
* @return This builder for chaining.
*/
public Builder clearWeightedPriorityHealth() {
weightedPriorityHealth_ = false;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:envoy.config.endpoint.v3.ClusterLoadAssignment.Policy)
}
// @@protoc_insertion_point(class_scope:envoy.config.endpoint.v3.ClusterLoadAssignment.Policy)
private static final io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy();
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Policy parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Policy(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int CLUSTER_NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object clusterName_;
/**
*
* 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>`.
*
* 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) = { ... }
* @return The bytes for clusterName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getClusterNameBytes() {
java.lang.Object ref = clusterName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
clusterName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ENDPOINTS_FIELD_NUMBER = 2;
private java.util.List endpoints_;
/**
*
*
* .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy policy = 4;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.PolicyOrBuilder getPolicyOrBuilder() {
return getPolicy();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, clusterName_);
}
for (int i = 0; i < endpoints_.size(); i++) {
output.writeMessage(2, endpoints_.get(i));
}
if (policy_ != null) {
output.writeMessage(4, getPolicy());
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetNamedEndpoints(),
NamedEndpointsDefaultEntryHolder.defaultEntry,
5);
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, clusterName_);
}
for (int i = 0; i < endpoints_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, endpoints_.get(i));
}
if (policy_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getPolicy());
}
for (java.util.Map.Entry entry
: internalGetNamedEndpoints().getMap().entrySet()) {
com.google.protobuf.MapEntry
namedEndpoints__ = NamedEndpointsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, namedEndpoints__);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment other = (io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment) obj;
if (!getClusterName()
.equals(other.getClusterName())) return false;
if (!getEndpointsList()
.equals(other.getEndpointsList())) return false;
if (!internalGetNamedEndpoints().equals(
other.internalGetNamedEndpoints())) return false;
if (hasPolicy() != other.hasPolicy()) return false;
if (hasPolicy()) {
if (!getPolicy()
.equals(other.getPolicy())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + CLUSTER_NAME_FIELD_NUMBER;
hash = (53 * hash) + getClusterName().hashCode();
if (getEndpointsCount() > 0) {
hash = (37 * hash) + ENDPOINTS_FIELD_NUMBER;
hash = (53 * hash) + getEndpointsList().hashCode();
}
if (!internalGetNamedEndpoints().getMap().isEmpty()) {
hash = (37 * hash) + NAMED_ENDPOINTS_FIELD_NUMBER;
hash = (53 * hash) + internalGetNamedEndpoints().hashCode();
}
if (hasPolicy()) {
hash = (37 * hash) + POLICY_FIELD_NUMBER;
hash = (53 * hash) + getPolicy().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* 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 {@code envoy.config.endpoint.v3.ClusterLoadAssignment}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.endpoint.v3.ClusterLoadAssignment)
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignmentOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.endpoint.v3.EndpointProto.internal_static_envoy_config_endpoint_v3_ClusterLoadAssignment_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 5:
return internalGetNamedEndpoints();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 5:
return internalGetMutableNamedEndpoints();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.endpoint.v3.EndpointProto.internal_static_envoy_config_endpoint_v3_ClusterLoadAssignment_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.class, io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getEndpointsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
clusterName_ = "";
if (endpointsBuilder_ == null) {
endpoints_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
endpointsBuilder_.clear();
}
internalGetMutableNamedEndpoints().clear();
if (policyBuilder_ == null) {
policy_ = null;
} else {
policy_ = null;
policyBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.config.endpoint.v3.EndpointProto.internal_static_envoy_config_endpoint_v3_ClusterLoadAssignment_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment build() {
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment buildPartial() {
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment result = new io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment(this);
int from_bitField0_ = bitField0_;
result.clusterName_ = clusterName_;
if (endpointsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
endpoints_ = java.util.Collections.unmodifiableList(endpoints_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.endpoints_ = endpoints_;
} else {
result.endpoints_ = endpointsBuilder_.build();
}
result.namedEndpoints_ = internalGetNamedEndpoints();
result.namedEndpoints_.makeImmutable();
if (policyBuilder_ == null) {
result.policy_ = policy_;
} else {
result.policy_ = policyBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment) {
return mergeFrom((io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment other) {
if (other == io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.getDefaultInstance()) return this;
if (!other.getClusterName().isEmpty()) {
clusterName_ = other.clusterName_;
onChanged();
}
if (endpointsBuilder_ == null) {
if (!other.endpoints_.isEmpty()) {
if (endpoints_.isEmpty()) {
endpoints_ = other.endpoints_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureEndpointsIsMutable();
endpoints_.addAll(other.endpoints_);
}
onChanged();
}
} else {
if (!other.endpoints_.isEmpty()) {
if (endpointsBuilder_.isEmpty()) {
endpointsBuilder_.dispose();
endpointsBuilder_ = null;
endpoints_ = other.endpoints_;
bitField0_ = (bitField0_ & ~0x00000001);
endpointsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getEndpointsFieldBuilder() : null;
} else {
endpointsBuilder_.addAllMessages(other.endpoints_);
}
}
}
internalGetMutableNamedEndpoints().mergeFrom(
other.internalGetNamedEndpoints());
if (other.hasPolicy()) {
mergePolicy(other.getPolicy());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object clusterName_ = "";
/**
*
* 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>`.
*
* 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>`.
*
* 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) = { ... }
* @param value The clusterName to set.
* @return This builder for chaining.
*/
public Builder setClusterName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
clusterName_ = value;
onChanged();
return this;
}
/**
*
* 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>`.
*
* 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) = { ... }
* @param value The bytes for clusterName to set.
* @return This builder for chaining.
*/
public Builder setClusterNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
clusterName_ = value;
onChanged();
return this;
}
private java.util.List endpoints_ =
java.util.Collections.emptyList();
private void ensureEndpointsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
endpoints_ = new java.util.ArrayList(endpoints_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints, io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.Builder, io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpointsOrBuilder> endpointsBuilder_;
/**
*