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/api/v2/cluster/circuit_breaker.proto
package io.envoyproxy.envoy.api.v2.cluster;
/**
*
* :ref:`Circuit breaking<arch_overview_circuit_break>` settings can be
* specified individually for each defined priority.
*
*
* Protobuf type {@code envoy.api.v2.cluster.CircuitBreakers}
*/
public final class CircuitBreakers extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.api.v2.cluster.CircuitBreakers)
CircuitBreakersOrBuilder {
private static final long serialVersionUID = 0L;
// Use CircuitBreakers.newBuilder() to construct.
private CircuitBreakers(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CircuitBreakers() {
thresholds_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CircuitBreakers();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CircuitBreakers(
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: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
thresholds_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
thresholds_.add(
input.readMessage(io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.parser(), extensionRegistry));
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)) {
thresholds_ = java.util.Collections.unmodifiableList(thresholds_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.api.v2.cluster.CircuitBreakerProto.internal_static_envoy_api_v2_cluster_CircuitBreakers_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.api.v2.cluster.CircuitBreakerProto.internal_static_envoy_api_v2_cluster_CircuitBreakers_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.class, io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Builder.class);
}
public interface ThresholdsOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.api.v2.cluster.CircuitBreakers.Thresholds)
com.google.protobuf.MessageOrBuilder {
/**
*
* The :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`
* the specified CircuitBreaker settings apply to.
*
*
* .envoy.api.v2.core.RoutingPriority priority = 1 [(.validate.rules) = { ... }
* @return The enum numeric value on the wire for priority.
*/
int getPriorityValue();
/**
*
* The :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`
* the specified CircuitBreaker settings apply to.
*
* Specifies a limit on concurrent retries in relation to the number of active requests. This
* parameter is optional.
* .. note::
* If this field is set, the retry budget will override any configured retry circuit
* breaker.
*
*
* .envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget retry_budget = 8;
* @return Whether the retryBudget field is set.
*/
boolean hasRetryBudget();
/**
*
* Specifies a limit on concurrent retries in relation to the number of active requests. This
* parameter is optional.
* .. note::
* If this field is set, the retry budget will override any configured retry circuit
* breaker.
*
* Specifies a limit on concurrent retries in relation to the number of active requests. This
* parameter is optional.
* .. note::
* If this field is set, the retry budget will override any configured retry circuit
* breaker.
*
* If track_remaining is true, then stats will be published that expose
* the number of resources remaining until the circuit breakers open. If
* not specified, the default is false.
* .. note::
* If a retry budget is used in lieu of the max_retries circuit breaker,
* the remaining retry resources remaining will not be tracked.
*
* The maximum number of connection pools per cluster that Envoy will concurrently support at
* once. If not specified, the default is unlimited. Set this for clusters which create a
* large number of connection pools. See
* :ref:`Circuit Breaking <arch_overview_circuit_break_cluster_maximum_connection_pools>` for
* more details.
*
*
* .google.protobuf.UInt32Value max_connection_pools = 7;
* @return Whether the maxConnectionPools field is set.
*/
boolean hasMaxConnectionPools();
/**
*
* The maximum number of connection pools per cluster that Envoy will concurrently support at
* once. If not specified, the default is unlimited. Set this for clusters which create a
* large number of connection pools. See
* :ref:`Circuit Breaking <arch_overview_circuit_break_cluster_maximum_connection_pools>` for
* more details.
*
* The maximum number of connection pools per cluster that Envoy will concurrently support at
* once. If not specified, the default is unlimited. Set this for clusters which create a
* large number of connection pools. See
* :ref:`Circuit Breaking <arch_overview_circuit_break_cluster_maximum_connection_pools>` for
* more details.
*
* A Thresholds defines CircuitBreaker settings for a
* :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`.
* [#next-free-field: 9]
*
*
* Protobuf type {@code envoy.api.v2.cluster.CircuitBreakers.Thresholds}
*/
public static final class Thresholds extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.api.v2.cluster.CircuitBreakers.Thresholds)
ThresholdsOrBuilder {
private static final long serialVersionUID = 0L;
// Use Thresholds.newBuilder() to construct.
private Thresholds(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Thresholds() {
priority_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Thresholds();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Thresholds(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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 8: {
int rawValue = input.readEnum();
priority_ = rawValue;
break;
}
case 18: {
com.google.protobuf.UInt32Value.Builder subBuilder = null;
if (maxConnections_ != null) {
subBuilder = maxConnections_.toBuilder();
}
maxConnections_ = input.readMessage(com.google.protobuf.UInt32Value.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(maxConnections_);
maxConnections_ = subBuilder.buildPartial();
}
break;
}
case 26: {
com.google.protobuf.UInt32Value.Builder subBuilder = null;
if (maxPendingRequests_ != null) {
subBuilder = maxPendingRequests_.toBuilder();
}
maxPendingRequests_ = input.readMessage(com.google.protobuf.UInt32Value.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(maxPendingRequests_);
maxPendingRequests_ = subBuilder.buildPartial();
}
break;
}
case 34: {
com.google.protobuf.UInt32Value.Builder subBuilder = null;
if (maxRequests_ != null) {
subBuilder = maxRequests_.toBuilder();
}
maxRequests_ = input.readMessage(com.google.protobuf.UInt32Value.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(maxRequests_);
maxRequests_ = subBuilder.buildPartial();
}
break;
}
case 42: {
com.google.protobuf.UInt32Value.Builder subBuilder = null;
if (maxRetries_ != null) {
subBuilder = maxRetries_.toBuilder();
}
maxRetries_ = input.readMessage(com.google.protobuf.UInt32Value.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(maxRetries_);
maxRetries_ = subBuilder.buildPartial();
}
break;
}
case 48: {
trackRemaining_ = input.readBool();
break;
}
case 58: {
com.google.protobuf.UInt32Value.Builder subBuilder = null;
if (maxConnectionPools_ != null) {
subBuilder = maxConnectionPools_.toBuilder();
}
maxConnectionPools_ = input.readMessage(com.google.protobuf.UInt32Value.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(maxConnectionPools_);
maxConnectionPools_ = subBuilder.buildPartial();
}
break;
}
case 66: {
io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget.Builder subBuilder = null;
if (retryBudget_ != null) {
subBuilder = retryBudget_.toBuilder();
}
retryBudget_ = input.readMessage(io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(retryBudget_);
retryBudget_ = subBuilder.buildPartial();
}
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 {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.api.v2.cluster.CircuitBreakerProto.internal_static_envoy_api_v2_cluster_CircuitBreakers_Thresholds_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.api.v2.cluster.CircuitBreakerProto.internal_static_envoy_api_v2_cluster_CircuitBreakers_Thresholds_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.class, io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.Builder.class);
}
public interface RetryBudgetOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget)
com.google.protobuf.MessageOrBuilder {
/**
*
* Specifies the limit on concurrent retries as a percentage of the sum of active requests and
* active pending requests. For example, if there are 100 active requests and the
* budget_percent is set to 25, there may be 25 active retries.
* This parameter is optional. Defaults to 20%.
*
*
* .envoy.type.Percent budget_percent = 1;
* @return Whether the budgetPercent field is set.
*/
boolean hasBudgetPercent();
/**
*
* Specifies the limit on concurrent retries as a percentage of the sum of active requests and
* active pending requests. For example, if there are 100 active requests and the
* budget_percent is set to 25, there may be 25 active retries.
* This parameter is optional. Defaults to 20%.
*
* Specifies the limit on concurrent retries as a percentage of the sum of active requests and
* active pending requests. For example, if there are 100 active requests and the
* budget_percent is set to 25, there may be 25 active retries.
* This parameter is optional. Defaults to 20%.
*
* Specifies the minimum retry concurrency allowed for the retry budget. The limit on the
* number of active retries may never go below this number.
* This parameter is optional. Defaults to 3.
*
*
* .google.protobuf.UInt32Value min_retry_concurrency = 2;
* @return Whether the minRetryConcurrency field is set.
*/
boolean hasMinRetryConcurrency();
/**
*
* Specifies the minimum retry concurrency allowed for the retry budget. The limit on the
* number of active retries may never go below this number.
* This parameter is optional. Defaults to 3.
*
* Specifies the minimum retry concurrency allowed for the retry budget. The limit on the
* number of active retries may never go below this number.
* This parameter is optional. Defaults to 3.
*
*
* .google.protobuf.UInt32Value min_retry_concurrency = 2;
*/
com.google.protobuf.UInt32ValueOrBuilder getMinRetryConcurrencyOrBuilder();
}
/**
* Protobuf type {@code envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget}
*/
public static final class RetryBudget extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget)
RetryBudgetOrBuilder {
private static final long serialVersionUID = 0L;
// Use RetryBudget.newBuilder() to construct.
private RetryBudget(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RetryBudget() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RetryBudget();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RetryBudget(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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: {
io.envoyproxy.envoy.type.Percent.Builder subBuilder = null;
if (budgetPercent_ != null) {
subBuilder = budgetPercent_.toBuilder();
}
budgetPercent_ = input.readMessage(io.envoyproxy.envoy.type.Percent.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(budgetPercent_);
budgetPercent_ = subBuilder.buildPartial();
}
break;
}
case 18: {
com.google.protobuf.UInt32Value.Builder subBuilder = null;
if (minRetryConcurrency_ != null) {
subBuilder = minRetryConcurrency_.toBuilder();
}
minRetryConcurrency_ = input.readMessage(com.google.protobuf.UInt32Value.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(minRetryConcurrency_);
minRetryConcurrency_ = subBuilder.buildPartial();
}
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 {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.api.v2.cluster.CircuitBreakerProto.internal_static_envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.api.v2.cluster.CircuitBreakerProto.internal_static_envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget.class, io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget.Builder.class);
}
public static final int BUDGET_PERCENT_FIELD_NUMBER = 1;
private io.envoyproxy.envoy.type.Percent budgetPercent_;
/**
*
* Specifies the limit on concurrent retries as a percentage of the sum of active requests and
* active pending requests. For example, if there are 100 active requests and the
* budget_percent is set to 25, there may be 25 active retries.
* This parameter is optional. Defaults to 20%.
*
*
* .envoy.type.Percent budget_percent = 1;
* @return Whether the budgetPercent field is set.
*/
@java.lang.Override
public boolean hasBudgetPercent() {
return budgetPercent_ != null;
}
/**
*
* Specifies the limit on concurrent retries as a percentage of the sum of active requests and
* active pending requests. For example, if there are 100 active requests and the
* budget_percent is set to 25, there may be 25 active retries.
* This parameter is optional. Defaults to 20%.
*
* Specifies the limit on concurrent retries as a percentage of the sum of active requests and
* active pending requests. For example, if there are 100 active requests and the
* budget_percent is set to 25, there may be 25 active retries.
* This parameter is optional. Defaults to 20%.
*
*
* .envoy.type.Percent budget_percent = 1;
*/
@java.lang.Override
public io.envoyproxy.envoy.type.PercentOrBuilder getBudgetPercentOrBuilder() {
return getBudgetPercent();
}
public static final int MIN_RETRY_CONCURRENCY_FIELD_NUMBER = 2;
private com.google.protobuf.UInt32Value minRetryConcurrency_;
/**
*
* Specifies the minimum retry concurrency allowed for the retry budget. The limit on the
* number of active retries may never go below this number.
* This parameter is optional. Defaults to 3.
*
*
* .google.protobuf.UInt32Value min_retry_concurrency = 2;
* @return Whether the minRetryConcurrency field is set.
*/
@java.lang.Override
public boolean hasMinRetryConcurrency() {
return minRetryConcurrency_ != null;
}
/**
*
* Specifies the minimum retry concurrency allowed for the retry budget. The limit on the
* number of active retries may never go below this number.
* This parameter is optional. Defaults to 3.
*
* Specifies the minimum retry concurrency allowed for the retry budget. The limit on the
* number of active retries may never go below this number.
* This parameter is optional. Defaults to 3.
*
*
* .google.protobuf.UInt32Value min_retry_concurrency = 2;
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getMinRetryConcurrencyOrBuilder() {
return getMinRetryConcurrency();
}
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 (budgetPercent_ != null) {
output.writeMessage(1, getBudgetPercent());
}
if (minRetryConcurrency_ != null) {
output.writeMessage(2, getMinRetryConcurrency());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (budgetPercent_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getBudgetPercent());
}
if (minRetryConcurrency_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getMinRetryConcurrency());
}
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.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget)) {
return super.equals(obj);
}
io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget other = (io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget) obj;
if (hasBudgetPercent() != other.hasBudgetPercent()) return false;
if (hasBudgetPercent()) {
if (!getBudgetPercent()
.equals(other.getBudgetPercent())) return false;
}
if (hasMinRetryConcurrency() != other.hasMinRetryConcurrency()) return false;
if (hasMinRetryConcurrency()) {
if (!getMinRetryConcurrency()
.equals(other.getMinRetryConcurrency())) 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 (hasBudgetPercent()) {
hash = (37 * hash) + BUDGET_PERCENT_FIELD_NUMBER;
hash = (53 * hash) + getBudgetPercent().hashCode();
}
if (hasMinRetryConcurrency()) {
hash = (37 * hash) + MIN_RETRY_CONCURRENCY_FIELD_NUMBER;
hash = (53 * hash) + getMinRetryConcurrency().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget 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.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget 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.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget 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.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget 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.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget 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.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget 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;
}
/**
* Protobuf type {@code envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget)
io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudgetOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.api.v2.cluster.CircuitBreakerProto.internal_static_envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.api.v2.cluster.CircuitBreakerProto.internal_static_envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget.class, io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget.Builder.class);
}
// Construct using io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (budgetPercentBuilder_ == null) {
budgetPercent_ = null;
} else {
budgetPercent_ = null;
budgetPercentBuilder_ = null;
}
if (minRetryConcurrencyBuilder_ == null) {
minRetryConcurrency_ = null;
} else {
minRetryConcurrency_ = null;
minRetryConcurrencyBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.api.v2.cluster.CircuitBreakerProto.internal_static_envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget getDefaultInstanceForType() {
return io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget build() {
io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget buildPartial() {
io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget result = new io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget(this);
if (budgetPercentBuilder_ == null) {
result.budgetPercent_ = budgetPercent_;
} else {
result.budgetPercent_ = budgetPercentBuilder_.build();
}
if (minRetryConcurrencyBuilder_ == null) {
result.minRetryConcurrency_ = minRetryConcurrency_;
} else {
result.minRetryConcurrency_ = minRetryConcurrencyBuilder_.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.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget) {
return mergeFrom((io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget other) {
if (other == io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget.getDefaultInstance()) return this;
if (other.hasBudgetPercent()) {
mergeBudgetPercent(other.getBudgetPercent());
}
if (other.hasMinRetryConcurrency()) {
mergeMinRetryConcurrency(other.getMinRetryConcurrency());
}
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.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private io.envoyproxy.envoy.type.Percent budgetPercent_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.type.Percent, io.envoyproxy.envoy.type.Percent.Builder, io.envoyproxy.envoy.type.PercentOrBuilder> budgetPercentBuilder_;
/**
*
* Specifies the limit on concurrent retries as a percentage of the sum of active requests and
* active pending requests. For example, if there are 100 active requests and the
* budget_percent is set to 25, there may be 25 active retries.
* This parameter is optional. Defaults to 20%.
*
*
* .envoy.type.Percent budget_percent = 1;
* @return Whether the budgetPercent field is set.
*/
public boolean hasBudgetPercent() {
return budgetPercentBuilder_ != null || budgetPercent_ != null;
}
/**
*
* Specifies the limit on concurrent retries as a percentage of the sum of active requests and
* active pending requests. For example, if there are 100 active requests and the
* budget_percent is set to 25, there may be 25 active retries.
* This parameter is optional. Defaults to 20%.
*
* Specifies the limit on concurrent retries as a percentage of the sum of active requests and
* active pending requests. For example, if there are 100 active requests and the
* budget_percent is set to 25, there may be 25 active retries.
* This parameter is optional. Defaults to 20%.
*
*
* .envoy.type.Percent budget_percent = 1;
*/
public Builder setBudgetPercent(io.envoyproxy.envoy.type.Percent value) {
if (budgetPercentBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
budgetPercent_ = value;
onChanged();
} else {
budgetPercentBuilder_.setMessage(value);
}
return this;
}
/**
*
* Specifies the limit on concurrent retries as a percentage of the sum of active requests and
* active pending requests. For example, if there are 100 active requests and the
* budget_percent is set to 25, there may be 25 active retries.
* This parameter is optional. Defaults to 20%.
*
* Specifies the limit on concurrent retries as a percentage of the sum of active requests and
* active pending requests. For example, if there are 100 active requests and the
* budget_percent is set to 25, there may be 25 active retries.
* This parameter is optional. Defaults to 20%.
*
* Specifies the limit on concurrent retries as a percentage of the sum of active requests and
* active pending requests. For example, if there are 100 active requests and the
* budget_percent is set to 25, there may be 25 active retries.
* This parameter is optional. Defaults to 20%.
*
* Specifies the limit on concurrent retries as a percentage of the sum of active requests and
* active pending requests. For example, if there are 100 active requests and the
* budget_percent is set to 25, there may be 25 active retries.
* This parameter is optional. Defaults to 20%.
*
* Specifies the limit on concurrent retries as a percentage of the sum of active requests and
* active pending requests. For example, if there are 100 active requests and the
* budget_percent is set to 25, there may be 25 active retries.
* This parameter is optional. Defaults to 20%.
*
* Specifies the limit on concurrent retries as a percentage of the sum of active requests and
* active pending requests. For example, if there are 100 active requests and the
* budget_percent is set to 25, there may be 25 active retries.
* This parameter is optional. Defaults to 20%.
*
* Specifies the minimum retry concurrency allowed for the retry budget. The limit on the
* number of active retries may never go below this number.
* This parameter is optional. Defaults to 3.
*
*
* .google.protobuf.UInt32Value min_retry_concurrency = 2;
* @return Whether the minRetryConcurrency field is set.
*/
public boolean hasMinRetryConcurrency() {
return minRetryConcurrencyBuilder_ != null || minRetryConcurrency_ != null;
}
/**
*
* Specifies the minimum retry concurrency allowed for the retry budget. The limit on the
* number of active retries may never go below this number.
* This parameter is optional. Defaults to 3.
*
* Specifies the minimum retry concurrency allowed for the retry budget. The limit on the
* number of active retries may never go below this number.
* This parameter is optional. Defaults to 3.
*
*
* .google.protobuf.UInt32Value min_retry_concurrency = 2;
*/
public Builder setMinRetryConcurrency(com.google.protobuf.UInt32Value value) {
if (minRetryConcurrencyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
minRetryConcurrency_ = value;
onChanged();
} else {
minRetryConcurrencyBuilder_.setMessage(value);
}
return this;
}
/**
*
* Specifies the minimum retry concurrency allowed for the retry budget. The limit on the
* number of active retries may never go below this number.
* This parameter is optional. Defaults to 3.
*
* Specifies the minimum retry concurrency allowed for the retry budget. The limit on the
* number of active retries may never go below this number.
* This parameter is optional. Defaults to 3.
*
* Specifies the minimum retry concurrency allowed for the retry budget. The limit on the
* number of active retries may never go below this number.
* This parameter is optional. Defaults to 3.
*
* Specifies the minimum retry concurrency allowed for the retry budget. The limit on the
* number of active retries may never go below this number.
* This parameter is optional. Defaults to 3.
*
* Specifies the minimum retry concurrency allowed for the retry budget. The limit on the
* number of active retries may never go below this number.
* This parameter is optional. Defaults to 3.
*
* Specifies the minimum retry concurrency allowed for the retry budget. The limit on the
* number of active retries may never go below this number.
* This parameter is optional. Defaults to 3.
*
*
* .google.protobuf.UInt32Value min_retry_concurrency = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>
getMinRetryConcurrencyFieldBuilder() {
if (minRetryConcurrencyBuilder_ == null) {
minRetryConcurrencyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>(
getMinRetryConcurrency(),
getParentForChildren(),
isClean());
minRetryConcurrency_ = null;
}
return minRetryConcurrencyBuilder_;
}
@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.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget)
}
// @@protoc_insertion_point(class_scope:envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget)
private static final io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget();
}
public static io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RetryBudget parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new RetryBudget(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.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int PRIORITY_FIELD_NUMBER = 1;
private int priority_;
/**
*
* The :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`
* the specified CircuitBreaker settings apply to.
*
*
* .envoy.api.v2.core.RoutingPriority priority = 1 [(.validate.rules) = { ... }
* @return The enum numeric value on the wire for priority.
*/
@java.lang.Override public int getPriorityValue() {
return priority_;
}
/**
*
* The :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`
* the specified CircuitBreaker settings apply to.
*
*
* .envoy.api.v2.core.RoutingPriority priority = 1 [(.validate.rules) = { ... }
* @return The priority.
*/
@java.lang.Override public io.envoyproxy.envoy.api.v2.core.RoutingPriority getPriority() {
@SuppressWarnings("deprecation")
io.envoyproxy.envoy.api.v2.core.RoutingPriority result = io.envoyproxy.envoy.api.v2.core.RoutingPriority.valueOf(priority_);
return result == null ? io.envoyproxy.envoy.api.v2.core.RoutingPriority.UNRECOGNIZED : result;
}
public static final int MAX_CONNECTIONS_FIELD_NUMBER = 2;
private com.google.protobuf.UInt32Value maxConnections_;
/**
*
* The maximum number of connections that Envoy will make to the upstream
* cluster. If not specified, the default is 1024.
*
*
* .google.protobuf.UInt32Value max_connections = 2;
* @return Whether the maxConnections field is set.
*/
@java.lang.Override
public boolean hasMaxConnections() {
return maxConnections_ != null;
}
/**
*
* The maximum number of connections that Envoy will make to the upstream
* cluster. If not specified, the default is 1024.
*
* The maximum number of parallel retries that Envoy will allow to the
* upstream cluster. If not specified, the default is 3.
*
*
* .google.protobuf.UInt32Value max_retries = 5;
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getMaxRetriesOrBuilder() {
return getMaxRetries();
}
public static final int RETRY_BUDGET_FIELD_NUMBER = 8;
private io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget retryBudget_;
/**
*
* Specifies a limit on concurrent retries in relation to the number of active requests. This
* parameter is optional.
* .. note::
* If this field is set, the retry budget will override any configured retry circuit
* breaker.
*
*
* .envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget retry_budget = 8;
* @return Whether the retryBudget field is set.
*/
@java.lang.Override
public boolean hasRetryBudget() {
return retryBudget_ != null;
}
/**
*
* Specifies a limit on concurrent retries in relation to the number of active requests. This
* parameter is optional.
* .. note::
* If this field is set, the retry budget will override any configured retry circuit
* breaker.
*
* Specifies a limit on concurrent retries in relation to the number of active requests. This
* parameter is optional.
* .. note::
* If this field is set, the retry budget will override any configured retry circuit
* breaker.
*
*
* .envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget retry_budget = 8;
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudgetOrBuilder getRetryBudgetOrBuilder() {
return getRetryBudget();
}
public static final int TRACK_REMAINING_FIELD_NUMBER = 6;
private boolean trackRemaining_;
/**
*
* If track_remaining is true, then stats will be published that expose
* the number of resources remaining until the circuit breakers open. If
* not specified, the default is false.
* .. note::
* If a retry budget is used in lieu of the max_retries circuit breaker,
* the remaining retry resources remaining will not be tracked.
*
*
* bool track_remaining = 6;
* @return The trackRemaining.
*/
@java.lang.Override
public boolean getTrackRemaining() {
return trackRemaining_;
}
public static final int MAX_CONNECTION_POOLS_FIELD_NUMBER = 7;
private com.google.protobuf.UInt32Value maxConnectionPools_;
/**
*
* The maximum number of connection pools per cluster that Envoy will concurrently support at
* once. If not specified, the default is unlimited. Set this for clusters which create a
* large number of connection pools. See
* :ref:`Circuit Breaking <arch_overview_circuit_break_cluster_maximum_connection_pools>` for
* more details.
*
*
* .google.protobuf.UInt32Value max_connection_pools = 7;
* @return Whether the maxConnectionPools field is set.
*/
@java.lang.Override
public boolean hasMaxConnectionPools() {
return maxConnectionPools_ != null;
}
/**
*
* The maximum number of connection pools per cluster that Envoy will concurrently support at
* once. If not specified, the default is unlimited. Set this for clusters which create a
* large number of connection pools. See
* :ref:`Circuit Breaking <arch_overview_circuit_break_cluster_maximum_connection_pools>` for
* more details.
*
* The maximum number of connection pools per cluster that Envoy will concurrently support at
* once. If not specified, the default is unlimited. Set this for clusters which create a
* large number of connection pools. See
* :ref:`Circuit Breaking <arch_overview_circuit_break_cluster_maximum_connection_pools>` for
* more details.
*
*
* .google.protobuf.UInt32Value max_connection_pools = 7;
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getMaxConnectionPoolsOrBuilder() {
return getMaxConnectionPools();
}
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 (priority_ != io.envoyproxy.envoy.api.v2.core.RoutingPriority.DEFAULT.getNumber()) {
output.writeEnum(1, priority_);
}
if (maxConnections_ != null) {
output.writeMessage(2, getMaxConnections());
}
if (maxPendingRequests_ != null) {
output.writeMessage(3, getMaxPendingRequests());
}
if (maxRequests_ != null) {
output.writeMessage(4, getMaxRequests());
}
if (maxRetries_ != null) {
output.writeMessage(5, getMaxRetries());
}
if (trackRemaining_ != false) {
output.writeBool(6, trackRemaining_);
}
if (maxConnectionPools_ != null) {
output.writeMessage(7, getMaxConnectionPools());
}
if (retryBudget_ != null) {
output.writeMessage(8, getRetryBudget());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (priority_ != io.envoyproxy.envoy.api.v2.core.RoutingPriority.DEFAULT.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, priority_);
}
if (maxConnections_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getMaxConnections());
}
if (maxPendingRequests_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getMaxPendingRequests());
}
if (maxRequests_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getMaxRequests());
}
if (maxRetries_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getMaxRetries());
}
if (trackRemaining_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(6, trackRemaining_);
}
if (maxConnectionPools_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, getMaxConnectionPools());
}
if (retryBudget_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, getRetryBudget());
}
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.api.v2.cluster.CircuitBreakers.Thresholds)) {
return super.equals(obj);
}
io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds other = (io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds) obj;
if (priority_ != other.priority_) return false;
if (hasMaxConnections() != other.hasMaxConnections()) return false;
if (hasMaxConnections()) {
if (!getMaxConnections()
.equals(other.getMaxConnections())) return false;
}
if (hasMaxPendingRequests() != other.hasMaxPendingRequests()) return false;
if (hasMaxPendingRequests()) {
if (!getMaxPendingRequests()
.equals(other.getMaxPendingRequests())) return false;
}
if (hasMaxRequests() != other.hasMaxRequests()) return false;
if (hasMaxRequests()) {
if (!getMaxRequests()
.equals(other.getMaxRequests())) return false;
}
if (hasMaxRetries() != other.hasMaxRetries()) return false;
if (hasMaxRetries()) {
if (!getMaxRetries()
.equals(other.getMaxRetries())) return false;
}
if (hasRetryBudget() != other.hasRetryBudget()) return false;
if (hasRetryBudget()) {
if (!getRetryBudget()
.equals(other.getRetryBudget())) return false;
}
if (getTrackRemaining()
!= other.getTrackRemaining()) return false;
if (hasMaxConnectionPools() != other.hasMaxConnectionPools()) return false;
if (hasMaxConnectionPools()) {
if (!getMaxConnectionPools()
.equals(other.getMaxConnectionPools())) 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) + PRIORITY_FIELD_NUMBER;
hash = (53 * hash) + priority_;
if (hasMaxConnections()) {
hash = (37 * hash) + MAX_CONNECTIONS_FIELD_NUMBER;
hash = (53 * hash) + getMaxConnections().hashCode();
}
if (hasMaxPendingRequests()) {
hash = (37 * hash) + MAX_PENDING_REQUESTS_FIELD_NUMBER;
hash = (53 * hash) + getMaxPendingRequests().hashCode();
}
if (hasMaxRequests()) {
hash = (37 * hash) + MAX_REQUESTS_FIELD_NUMBER;
hash = (53 * hash) + getMaxRequests().hashCode();
}
if (hasMaxRetries()) {
hash = (37 * hash) + MAX_RETRIES_FIELD_NUMBER;
hash = (53 * hash) + getMaxRetries().hashCode();
}
if (hasRetryBudget()) {
hash = (37 * hash) + RETRY_BUDGET_FIELD_NUMBER;
hash = (53 * hash) + getRetryBudget().hashCode();
}
hash = (37 * hash) + TRACK_REMAINING_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getTrackRemaining());
if (hasMaxConnectionPools()) {
hash = (37 * hash) + MAX_CONNECTION_POOLS_FIELD_NUMBER;
hash = (53 * hash) + getMaxConnectionPools().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds 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.api.v2.cluster.CircuitBreakers.Thresholds parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds 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.api.v2.cluster.CircuitBreakers.Thresholds parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds 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.api.v2.cluster.CircuitBreakers.Thresholds parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds 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.api.v2.cluster.CircuitBreakers.Thresholds parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds 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.api.v2.cluster.CircuitBreakers.Thresholds 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;
}
/**
*
* A Thresholds defines CircuitBreaker settings for a
* :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`.
* [#next-free-field: 9]
*
* The :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`
* the specified CircuitBreaker settings apply to.
*
*
* .envoy.api.v2.core.RoutingPriority priority = 1 [(.validate.rules) = { ... }
* @return The enum numeric value on the wire for priority.
*/
@java.lang.Override public int getPriorityValue() {
return priority_;
}
/**
*
* The :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`
* the specified CircuitBreaker settings apply to.
*
*
* .envoy.api.v2.core.RoutingPriority priority = 1 [(.validate.rules) = { ... }
* @param value The enum numeric value on the wire for priority to set.
* @return This builder for chaining.
*/
public Builder setPriorityValue(int value) {
priority_ = value;
onChanged();
return this;
}
/**
*
* The :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`
* the specified CircuitBreaker settings apply to.
*
*
* .envoy.api.v2.core.RoutingPriority priority = 1 [(.validate.rules) = { ... }
* @return The priority.
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.core.RoutingPriority getPriority() {
@SuppressWarnings("deprecation")
io.envoyproxy.envoy.api.v2.core.RoutingPriority result = io.envoyproxy.envoy.api.v2.core.RoutingPriority.valueOf(priority_);
return result == null ? io.envoyproxy.envoy.api.v2.core.RoutingPriority.UNRECOGNIZED : result;
}
/**
*
* The :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`
* the specified CircuitBreaker settings apply to.
*
*
* .envoy.api.v2.core.RoutingPriority priority = 1 [(.validate.rules) = { ... }
* @param value The priority to set.
* @return This builder for chaining.
*/
public Builder setPriority(io.envoyproxy.envoy.api.v2.core.RoutingPriority value) {
if (value == null) {
throw new NullPointerException();
}
priority_ = value.getNumber();
onChanged();
return this;
}
/**
*
* The :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`
* the specified CircuitBreaker settings apply to.
*
* Specifies a limit on concurrent retries in relation to the number of active requests. This
* parameter is optional.
* .. note::
* If this field is set, the retry budget will override any configured retry circuit
* breaker.
*
*
* .envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget retry_budget = 8;
* @return Whether the retryBudget field is set.
*/
public boolean hasRetryBudget() {
return retryBudgetBuilder_ != null || retryBudget_ != null;
}
/**
*
* Specifies a limit on concurrent retries in relation to the number of active requests. This
* parameter is optional.
* .. note::
* If this field is set, the retry budget will override any configured retry circuit
* breaker.
*
* Specifies a limit on concurrent retries in relation to the number of active requests. This
* parameter is optional.
* .. note::
* If this field is set, the retry budget will override any configured retry circuit
* breaker.
*
*
* .envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget retry_budget = 8;
*/
public Builder setRetryBudget(io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget value) {
if (retryBudgetBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
retryBudget_ = value;
onChanged();
} else {
retryBudgetBuilder_.setMessage(value);
}
return this;
}
/**
*
* Specifies a limit on concurrent retries in relation to the number of active requests. This
* parameter is optional.
* .. note::
* If this field is set, the retry budget will override any configured retry circuit
* breaker.
*
* Specifies a limit on concurrent retries in relation to the number of active requests. This
* parameter is optional.
* .. note::
* If this field is set, the retry budget will override any configured retry circuit
* breaker.
*
* Specifies a limit on concurrent retries in relation to the number of active requests. This
* parameter is optional.
* .. note::
* If this field is set, the retry budget will override any configured retry circuit
* breaker.
*
* Specifies a limit on concurrent retries in relation to the number of active requests. This
* parameter is optional.
* .. note::
* If this field is set, the retry budget will override any configured retry circuit
* breaker.
*
* Specifies a limit on concurrent retries in relation to the number of active requests. This
* parameter is optional.
* .. note::
* If this field is set, the retry budget will override any configured retry circuit
* breaker.
*
* Specifies a limit on concurrent retries in relation to the number of active requests. This
* parameter is optional.
* .. note::
* If this field is set, the retry budget will override any configured retry circuit
* breaker.
*
* If track_remaining is true, then stats will be published that expose
* the number of resources remaining until the circuit breakers open. If
* not specified, the default is false.
* .. note::
* If a retry budget is used in lieu of the max_retries circuit breaker,
* the remaining retry resources remaining will not be tracked.
*
* If track_remaining is true, then stats will be published that expose
* the number of resources remaining until the circuit breakers open. If
* not specified, the default is false.
* .. note::
* If a retry budget is used in lieu of the max_retries circuit breaker,
* the remaining retry resources remaining will not be tracked.
*
*
* bool track_remaining = 6;
* @param value The trackRemaining to set.
* @return This builder for chaining.
*/
public Builder setTrackRemaining(boolean value) {
trackRemaining_ = value;
onChanged();
return this;
}
/**
*
* If track_remaining is true, then stats will be published that expose
* the number of resources remaining until the circuit breakers open. If
* not specified, the default is false.
* .. note::
* If a retry budget is used in lieu of the max_retries circuit breaker,
* the remaining retry resources remaining will not be tracked.
*
* The maximum number of connection pools per cluster that Envoy will concurrently support at
* once. If not specified, the default is unlimited. Set this for clusters which create a
* large number of connection pools. See
* :ref:`Circuit Breaking <arch_overview_circuit_break_cluster_maximum_connection_pools>` for
* more details.
*
*
* .google.protobuf.UInt32Value max_connection_pools = 7;
* @return Whether the maxConnectionPools field is set.
*/
public boolean hasMaxConnectionPools() {
return maxConnectionPoolsBuilder_ != null || maxConnectionPools_ != null;
}
/**
*
* The maximum number of connection pools per cluster that Envoy will concurrently support at
* once. If not specified, the default is unlimited. Set this for clusters which create a
* large number of connection pools. See
* :ref:`Circuit Breaking <arch_overview_circuit_break_cluster_maximum_connection_pools>` for
* more details.
*
* The maximum number of connection pools per cluster that Envoy will concurrently support at
* once. If not specified, the default is unlimited. Set this for clusters which create a
* large number of connection pools. See
* :ref:`Circuit Breaking <arch_overview_circuit_break_cluster_maximum_connection_pools>` for
* more details.
*
*
* .google.protobuf.UInt32Value max_connection_pools = 7;
*/
public Builder setMaxConnectionPools(com.google.protobuf.UInt32Value value) {
if (maxConnectionPoolsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
maxConnectionPools_ = value;
onChanged();
} else {
maxConnectionPoolsBuilder_.setMessage(value);
}
return this;
}
/**
*
* The maximum number of connection pools per cluster that Envoy will concurrently support at
* once. If not specified, the default is unlimited. Set this for clusters which create a
* large number of connection pools. See
* :ref:`Circuit Breaking <arch_overview_circuit_break_cluster_maximum_connection_pools>` for
* more details.
*
* The maximum number of connection pools per cluster that Envoy will concurrently support at
* once. If not specified, the default is unlimited. Set this for clusters which create a
* large number of connection pools. See
* :ref:`Circuit Breaking <arch_overview_circuit_break_cluster_maximum_connection_pools>` for
* more details.
*
* The maximum number of connection pools per cluster that Envoy will concurrently support at
* once. If not specified, the default is unlimited. Set this for clusters which create a
* large number of connection pools. See
* :ref:`Circuit Breaking <arch_overview_circuit_break_cluster_maximum_connection_pools>` for
* more details.
*
* The maximum number of connection pools per cluster that Envoy will concurrently support at
* once. If not specified, the default is unlimited. Set this for clusters which create a
* large number of connection pools. See
* :ref:`Circuit Breaking <arch_overview_circuit_break_cluster_maximum_connection_pools>` for
* more details.
*
* The maximum number of connection pools per cluster that Envoy will concurrently support at
* once. If not specified, the default is unlimited. Set this for clusters which create a
* large number of connection pools. See
* :ref:`Circuit Breaking <arch_overview_circuit_break_cluster_maximum_connection_pools>` for
* more details.
*
* The maximum number of connection pools per cluster that Envoy will concurrently support at
* once. If not specified, the default is unlimited. Set this for clusters which create a
* large number of connection pools. See
* :ref:`Circuit Breaking <arch_overview_circuit_break_cluster_maximum_connection_pools>` for
* more details.
*
*
* .google.protobuf.UInt32Value max_connection_pools = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>
getMaxConnectionPoolsFieldBuilder() {
if (maxConnectionPoolsBuilder_ == null) {
maxConnectionPoolsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>(
getMaxConnectionPools(),
getParentForChildren(),
isClean());
maxConnectionPools_ = null;
}
return maxConnectionPoolsBuilder_;
}
@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.api.v2.cluster.CircuitBreakers.Thresholds)
}
// @@protoc_insertion_point(class_scope:envoy.api.v2.cluster.CircuitBreakers.Thresholds)
private static final io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds();
}
public static io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Thresholds parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Thresholds(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.api.v2.cluster.CircuitBreakers.Thresholds getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int THRESHOLDS_FIELD_NUMBER = 1;
private java.util.List thresholds_;
/**
*
* If multiple :ref:`Thresholds<envoy_api_msg_cluster.CircuitBreakers.Thresholds>`
* are defined with the same :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`,
* the first one in the list is used. If no Thresholds is defined for a given
* :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`, the default values
* are used.
*
* If multiple :ref:`Thresholds<envoy_api_msg_cluster.CircuitBreakers.Thresholds>`
* are defined with the same :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`,
* the first one in the list is used. If no Thresholds is defined for a given
* :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`, the default values
* are used.
*
* If multiple :ref:`Thresholds<envoy_api_msg_cluster.CircuitBreakers.Thresholds>`
* are defined with the same :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`,
* the first one in the list is used. If no Thresholds is defined for a given
* :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`, the default values
* are used.
*
*
* repeated .envoy.api.v2.cluster.CircuitBreakers.Thresholds thresholds = 1;
*/
@java.lang.Override
public int getThresholdsCount() {
return thresholds_.size();
}
/**
*
* If multiple :ref:`Thresholds<envoy_api_msg_cluster.CircuitBreakers.Thresholds>`
* are defined with the same :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`,
* the first one in the list is used. If no Thresholds is defined for a given
* :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`, the default values
* are used.
*
* If multiple :ref:`Thresholds<envoy_api_msg_cluster.CircuitBreakers.Thresholds>`
* are defined with the same :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`,
* the first one in the list is used. If no Thresholds is defined for a given
* :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`, the default values
* are used.
*
*
* repeated .envoy.api.v2.cluster.CircuitBreakers.Thresholds thresholds = 1;
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.ThresholdsOrBuilder getThresholdsOrBuilder(
int index) {
return thresholds_.get(index);
}
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 < thresholds_.size(); i++) {
output.writeMessage(1, thresholds_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < thresholds_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, thresholds_.get(i));
}
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.api.v2.cluster.CircuitBreakers)) {
return super.equals(obj);
}
io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers other = (io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers) obj;
if (!getThresholdsList()
.equals(other.getThresholdsList())) 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 (getThresholdsCount() > 0) {
hash = (37 * hash) + THRESHOLDS_FIELD_NUMBER;
hash = (53 * hash) + getThresholdsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers 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.api.v2.cluster.CircuitBreakers parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers 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.api.v2.cluster.CircuitBreakers parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers 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.api.v2.cluster.CircuitBreakers parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers 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.api.v2.cluster.CircuitBreakers parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers 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.api.v2.cluster.CircuitBreakers 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;
}
/**
*
* :ref:`Circuit breaking<arch_overview_circuit_break>` settings can be
* specified individually for each defined priority.
*
*
* Protobuf type {@code envoy.api.v2.cluster.CircuitBreakers}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.api.v2.cluster.CircuitBreakers)
io.envoyproxy.envoy.api.v2.cluster.CircuitBreakersOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.api.v2.cluster.CircuitBreakerProto.internal_static_envoy_api_v2_cluster_CircuitBreakers_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.api.v2.cluster.CircuitBreakerProto.internal_static_envoy_api_v2_cluster_CircuitBreakers_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.class, io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Builder.class);
}
// Construct using io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getThresholdsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (thresholdsBuilder_ == null) {
thresholds_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
thresholdsBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.api.v2.cluster.CircuitBreakerProto.internal_static_envoy_api_v2_cluster_CircuitBreakers_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers getDefaultInstanceForType() {
return io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers build() {
io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers buildPartial() {
io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers result = new io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers(this);
int from_bitField0_ = bitField0_;
if (thresholdsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
thresholds_ = java.util.Collections.unmodifiableList(thresholds_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.thresholds_ = thresholds_;
} else {
result.thresholds_ = thresholdsBuilder_.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.api.v2.cluster.CircuitBreakers) {
return mergeFrom((io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers other) {
if (other == io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.getDefaultInstance()) return this;
if (thresholdsBuilder_ == null) {
if (!other.thresholds_.isEmpty()) {
if (thresholds_.isEmpty()) {
thresholds_ = other.thresholds_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureThresholdsIsMutable();
thresholds_.addAll(other.thresholds_);
}
onChanged();
}
} else {
if (!other.thresholds_.isEmpty()) {
if (thresholdsBuilder_.isEmpty()) {
thresholdsBuilder_.dispose();
thresholdsBuilder_ = null;
thresholds_ = other.thresholds_;
bitField0_ = (bitField0_ & ~0x00000001);
thresholdsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getThresholdsFieldBuilder() : null;
} else {
thresholdsBuilder_.addAllMessages(other.thresholds_);
}
}
}
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.api.v2.cluster.CircuitBreakers parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List thresholds_ =
java.util.Collections.emptyList();
private void ensureThresholdsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
thresholds_ = new java.util.ArrayList(thresholds_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds, io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.Builder, io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.ThresholdsOrBuilder> thresholdsBuilder_;
/**
*
* If multiple :ref:`Thresholds<envoy_api_msg_cluster.CircuitBreakers.Thresholds>`
* are defined with the same :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`,
* the first one in the list is used. If no Thresholds is defined for a given
* :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`, the default values
* are used.
*
* If multiple :ref:`Thresholds<envoy_api_msg_cluster.CircuitBreakers.Thresholds>`
* are defined with the same :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`,
* the first one in the list is used. If no Thresholds is defined for a given
* :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`, the default values
* are used.
*
*
* repeated .envoy.api.v2.cluster.CircuitBreakers.Thresholds thresholds = 1;
*/
public int getThresholdsCount() {
if (thresholdsBuilder_ == null) {
return thresholds_.size();
} else {
return thresholdsBuilder_.getCount();
}
}
/**
*
* If multiple :ref:`Thresholds<envoy_api_msg_cluster.CircuitBreakers.Thresholds>`
* are defined with the same :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`,
* the first one in the list is used. If no Thresholds is defined for a given
* :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`, the default values
* are used.
*
* If multiple :ref:`Thresholds<envoy_api_msg_cluster.CircuitBreakers.Thresholds>`
* are defined with the same :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`,
* the first one in the list is used. If no Thresholds is defined for a given
* :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`, the default values
* are used.
*
*
* repeated .envoy.api.v2.cluster.CircuitBreakers.Thresholds thresholds = 1;
*/
public Builder setThresholds(
int index, io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds value) {
if (thresholdsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureThresholdsIsMutable();
thresholds_.set(index, value);
onChanged();
} else {
thresholdsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* If multiple :ref:`Thresholds<envoy_api_msg_cluster.CircuitBreakers.Thresholds>`
* are defined with the same :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`,
* the first one in the list is used. If no Thresholds is defined for a given
* :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`, the default values
* are used.
*
* If multiple :ref:`Thresholds<envoy_api_msg_cluster.CircuitBreakers.Thresholds>`
* are defined with the same :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`,
* the first one in the list is used. If no Thresholds is defined for a given
* :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`, the default values
* are used.
*
*
* repeated .envoy.api.v2.cluster.CircuitBreakers.Thresholds thresholds = 1;
*/
public Builder addThresholds(io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds value) {
if (thresholdsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureThresholdsIsMutable();
thresholds_.add(value);
onChanged();
} else {
thresholdsBuilder_.addMessage(value);
}
return this;
}
/**
*
* If multiple :ref:`Thresholds<envoy_api_msg_cluster.CircuitBreakers.Thresholds>`
* are defined with the same :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`,
* the first one in the list is used. If no Thresholds is defined for a given
* :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`, the default values
* are used.
*
*
* repeated .envoy.api.v2.cluster.CircuitBreakers.Thresholds thresholds = 1;
*/
public Builder addThresholds(
int index, io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds value) {
if (thresholdsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureThresholdsIsMutable();
thresholds_.add(index, value);
onChanged();
} else {
thresholdsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* If multiple :ref:`Thresholds<envoy_api_msg_cluster.CircuitBreakers.Thresholds>`
* are defined with the same :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`,
* the first one in the list is used. If no Thresholds is defined for a given
* :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`, the default values
* are used.
*
* If multiple :ref:`Thresholds<envoy_api_msg_cluster.CircuitBreakers.Thresholds>`
* are defined with the same :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`,
* the first one in the list is used. If no Thresholds is defined for a given
* :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`, the default values
* are used.
*
* If multiple :ref:`Thresholds<envoy_api_msg_cluster.CircuitBreakers.Thresholds>`
* are defined with the same :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`,
* the first one in the list is used. If no Thresholds is defined for a given
* :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`, the default values
* are used.
*
* If multiple :ref:`Thresholds<envoy_api_msg_cluster.CircuitBreakers.Thresholds>`
* are defined with the same :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`,
* the first one in the list is used. If no Thresholds is defined for a given
* :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`, the default values
* are used.
*
* If multiple :ref:`Thresholds<envoy_api_msg_cluster.CircuitBreakers.Thresholds>`
* are defined with the same :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`,
* the first one in the list is used. If no Thresholds is defined for a given
* :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`, the default values
* are used.
*
* If multiple :ref:`Thresholds<envoy_api_msg_cluster.CircuitBreakers.Thresholds>`
* are defined with the same :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`,
* the first one in the list is used. If no Thresholds is defined for a given
* :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`, the default values
* are used.
*
*
* repeated .envoy.api.v2.cluster.CircuitBreakers.Thresholds thresholds = 1;
*/
public io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.Builder getThresholdsBuilder(
int index) {
return getThresholdsFieldBuilder().getBuilder(index);
}
/**
*
* If multiple :ref:`Thresholds<envoy_api_msg_cluster.CircuitBreakers.Thresholds>`
* are defined with the same :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`,
* the first one in the list is used. If no Thresholds is defined for a given
* :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`, the default values
* are used.
*
*
* repeated .envoy.api.v2.cluster.CircuitBreakers.Thresholds thresholds = 1;
*/
public io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.ThresholdsOrBuilder getThresholdsOrBuilder(
int index) {
if (thresholdsBuilder_ == null) {
return thresholds_.get(index); } else {
return thresholdsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* If multiple :ref:`Thresholds<envoy_api_msg_cluster.CircuitBreakers.Thresholds>`
* are defined with the same :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`,
* the first one in the list is used. If no Thresholds is defined for a given
* :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`, the default values
* are used.
*
* If multiple :ref:`Thresholds<envoy_api_msg_cluster.CircuitBreakers.Thresholds>`
* are defined with the same :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`,
* the first one in the list is used. If no Thresholds is defined for a given
* :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`, the default values
* are used.
*
* If multiple :ref:`Thresholds<envoy_api_msg_cluster.CircuitBreakers.Thresholds>`
* are defined with the same :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`,
* the first one in the list is used. If no Thresholds is defined for a given
* :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`, the default values
* are used.
*
* If multiple :ref:`Thresholds<envoy_api_msg_cluster.CircuitBreakers.Thresholds>`
* are defined with the same :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`,
* the first one in the list is used. If no Thresholds is defined for a given
* :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`, the default values
* are used.
*
*
* repeated .envoy.api.v2.cluster.CircuitBreakers.Thresholds thresholds = 1;
*/
public java.util.List
getThresholdsBuilderList() {
return getThresholdsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds, io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.Builder, io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.ThresholdsOrBuilder>
getThresholdsFieldBuilder() {
if (thresholdsBuilder_ == null) {
thresholdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds, io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.Thresholds.Builder, io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers.ThresholdsOrBuilder>(
thresholds_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
thresholds_ = null;
}
return thresholdsBuilder_;
}
@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.api.v2.cluster.CircuitBreakers)
}
// @@protoc_insertion_point(class_scope:envoy.api.v2.cluster.CircuitBreakers)
private static final io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers();
}
public static io.envoyproxy.envoy.api.v2.cluster.CircuitBreakers getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CircuitBreakers parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CircuitBreakers(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.api.v2.cluster.CircuitBreakers getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}