Class RetryPolicy
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- io.envoyproxy.envoy.config.route.v3.RetryPolicy
-
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,RetryPolicyOrBuilder,Serializable
public final class RetryPolicy extends com.google.protobuf.GeneratedMessageV3 implements RetryPolicyOrBuilder
HTTP retry :ref:`architecture overview <arch_overview_http_routing_retry>`. [#next-free-field: 14]
Protobuf typeenvoy.config.route.v3.RetryPolicy- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRetryPolicy.BuilderHTTP retry :ref:`architecture overview <arch_overview_http_routing_retry>`.static classRetryPolicy.RateLimitedRetryBackOffA retry back-off strategy that applies when the upstream server rate limits the request.static interfaceRetryPolicy.RateLimitedRetryBackOffOrBuilderstatic classRetryPolicy.ResetHeaderProtobuf typeenvoy.config.route.v3.RetryPolicy.ResetHeaderstatic classRetryPolicy.ResetHeaderFormatProtobuf enumenvoy.config.route.v3.RetryPolicy.ResetHeaderFormatstatic interfaceRetryPolicy.ResetHeaderOrBuilderstatic classRetryPolicy.RetryBackOffProtobuf typeenvoy.config.route.v3.RetryPolicy.RetryBackOffstatic interfaceRetryPolicy.RetryBackOffOrBuilderstatic classRetryPolicy.RetryHostPredicateProtobuf typeenvoy.config.route.v3.RetryPolicy.RetryHostPredicatestatic interfaceRetryPolicy.RetryHostPredicateOrBuilderstatic classRetryPolicy.RetryPriorityProtobuf typeenvoy.config.route.v3.RetryPolicy.RetryPrioritystatic interfaceRetryPolicy.RetryPriorityOrBuilder-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intHOST_SELECTION_RETRY_MAX_ATTEMPTS_FIELD_NUMBERstatic intNUM_RETRIES_FIELD_NUMBERstatic intPER_TRY_IDLE_TIMEOUT_FIELD_NUMBERstatic intPER_TRY_TIMEOUT_FIELD_NUMBERstatic intRATE_LIMITED_RETRY_BACK_OFF_FIELD_NUMBERstatic intRETRIABLE_HEADERS_FIELD_NUMBERstatic intRETRIABLE_REQUEST_HEADERS_FIELD_NUMBERstatic intRETRIABLE_STATUS_CODES_FIELD_NUMBERstatic intRETRY_BACK_OFF_FIELD_NUMBERstatic intRETRY_HOST_PREDICATE_FIELD_NUMBERstatic intRETRY_ON_FIELD_NUMBERstatic intRETRY_OPTIONS_PREDICATES_FIELD_NUMBERstatic intRETRY_PRIORITY_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)static RetryPolicygetDefaultInstance()RetryPolicygetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()longgetHostSelectionRetryMaxAttempts()The maximum number of times host selection will be reattempted before giving up, at which point the host that was last selected will be routed to.com.google.protobuf.UInt32ValuegetNumRetries()Specifies the allowed number of retries.com.google.protobuf.UInt32ValueOrBuildergetNumRetriesOrBuilder()Specifies the allowed number of retries.com.google.protobuf.Parser<RetryPolicy>getParserForType()com.google.protobuf.DurationgetPerTryIdleTimeout()Specifies an upstream idle timeout per retry attempt (including the initial attempt).com.google.protobuf.DurationOrBuildergetPerTryIdleTimeoutOrBuilder()Specifies an upstream idle timeout per retry attempt (including the initial attempt).com.google.protobuf.DurationgetPerTryTimeout()Specifies a non-zero upstream timeout per retry attempt (including the initial attempt).com.google.protobuf.DurationOrBuildergetPerTryTimeoutOrBuilder()Specifies a non-zero upstream timeout per retry attempt (including the initial attempt).RetryPolicy.RateLimitedRetryBackOffgetRateLimitedRetryBackOff()Specifies parameters that control a retry back-off strategy that is used when the request is rate limited by the upstream server.RetryPolicy.RateLimitedRetryBackOffOrBuildergetRateLimitedRetryBackOffOrBuilder()Specifies parameters that control a retry back-off strategy that is used when the request is rate limited by the upstream server.HeaderMatchergetRetriableHeaders(int index)HTTP response headers that trigger a retry if present in the response.intgetRetriableHeadersCount()HTTP response headers that trigger a retry if present in the response.List<HeaderMatcher>getRetriableHeadersList()HTTP response headers that trigger a retry if present in the response.HeaderMatcherOrBuildergetRetriableHeadersOrBuilder(int index)HTTP response headers that trigger a retry if present in the response.List<? extends HeaderMatcherOrBuilder>getRetriableHeadersOrBuilderList()HTTP response headers that trigger a retry if present in the response.HeaderMatchergetRetriableRequestHeaders(int index)HTTP headers which must be present in the request for retries to be attempted.intgetRetriableRequestHeadersCount()HTTP headers which must be present in the request for retries to be attempted.List<HeaderMatcher>getRetriableRequestHeadersList()HTTP headers which must be present in the request for retries to be attempted.HeaderMatcherOrBuildergetRetriableRequestHeadersOrBuilder(int index)HTTP headers which must be present in the request for retries to be attempted.List<? extends HeaderMatcherOrBuilder>getRetriableRequestHeadersOrBuilderList()HTTP headers which must be present in the request for retries to be attempted.intgetRetriableStatusCodes(int index)HTTP status codes that should trigger a retry in addition to those specified by retry_on.intgetRetriableStatusCodesCount()HTTP status codes that should trigger a retry in addition to those specified by retry_on.List<Integer>getRetriableStatusCodesList()HTTP status codes that should trigger a retry in addition to those specified by retry_on.RetryPolicy.RetryBackOffgetRetryBackOff()Specifies parameters that control exponential retry back off.RetryPolicy.RetryBackOffOrBuildergetRetryBackOffOrBuilder()Specifies parameters that control exponential retry back off.RetryPolicy.RetryHostPredicategetRetryHostPredicate(int index)Specifies a collection of RetryHostPredicates that will be consulted when selecting a host for retries.intgetRetryHostPredicateCount()Specifies a collection of RetryHostPredicates that will be consulted when selecting a host for retries.List<RetryPolicy.RetryHostPredicate>getRetryHostPredicateList()Specifies a collection of RetryHostPredicates that will be consulted when selecting a host for retries.RetryPolicy.RetryHostPredicateOrBuildergetRetryHostPredicateOrBuilder(int index)Specifies a collection of RetryHostPredicates that will be consulted when selecting a host for retries.List<? extends RetryPolicy.RetryHostPredicateOrBuilder>getRetryHostPredicateOrBuilderList()Specifies a collection of RetryHostPredicates that will be consulted when selecting a host for retries.StringgetRetryOn()Specifies the conditions under which retry takes place.com.google.protobuf.ByteStringgetRetryOnBytes()Specifies the conditions under which retry takes place.TypedExtensionConfiggetRetryOptionsPredicates(int index)Retry options predicates that will be applied prior to retrying a request.intgetRetryOptionsPredicatesCount()Retry options predicates that will be applied prior to retrying a request.List<TypedExtensionConfig>getRetryOptionsPredicatesList()Retry options predicates that will be applied prior to retrying a request.TypedExtensionConfigOrBuildergetRetryOptionsPredicatesOrBuilder(int index)Retry options predicates that will be applied prior to retrying a request.List<? extends TypedExtensionConfigOrBuilder>getRetryOptionsPredicatesOrBuilderList()Retry options predicates that will be applied prior to retrying a request.RetryPolicy.RetryPrioritygetRetryPriority()Specifies an implementation of a RetryPriority which is used to determine the distribution of load across priorities used for retries.RetryPolicy.RetryPriorityOrBuildergetRetryPriorityOrBuilder()Specifies an implementation of a RetryPriority which is used to determine the distribution of load across priorities used for retries.intgetSerializedSize()com.google.protobuf.UnknownFieldSetgetUnknownFields()inthashCode()booleanhasNumRetries()Specifies the allowed number of retries.booleanhasPerTryIdleTimeout()Specifies an upstream idle timeout per retry attempt (including the initial attempt).booleanhasPerTryTimeout()Specifies a non-zero upstream timeout per retry attempt (including the initial attempt).booleanhasRateLimitedRetryBackOff()Specifies parameters that control a retry back-off strategy that is used when the request is rate limited by the upstream server.booleanhasRetryBackOff()Specifies parameters that control exponential retry back off.booleanhasRetryPriority()Specifies an implementation of a RetryPriority which is used to determine the distribution of load across priorities used for retries.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static RetryPolicy.BuildernewBuilder()static RetryPolicy.BuildernewBuilder(RetryPolicy prototype)RetryPolicy.BuildernewBuilderForType()protected RetryPolicy.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static RetryPolicyparseDelimitedFrom(InputStream input)static RetryPolicyparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static RetryPolicyparseFrom(byte[] data)static RetryPolicyparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static RetryPolicyparseFrom(com.google.protobuf.ByteString data)static RetryPolicyparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static RetryPolicyparseFrom(com.google.protobuf.CodedInputStream input)static RetryPolicyparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static RetryPolicyparseFrom(InputStream input)static RetryPolicyparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static RetryPolicyparseFrom(ByteBuffer data)static RetryPolicyparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<RetryPolicy>parser()RetryPolicy.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
RETRY_ON_FIELD_NUMBER
public static final int RETRY_ON_FIELD_NUMBER
- See Also:
- Constant Field Values
-
NUM_RETRIES_FIELD_NUMBER
public static final int NUM_RETRIES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PER_TRY_TIMEOUT_FIELD_NUMBER
public static final int PER_TRY_TIMEOUT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PER_TRY_IDLE_TIMEOUT_FIELD_NUMBER
public static final int PER_TRY_IDLE_TIMEOUT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
RETRY_PRIORITY_FIELD_NUMBER
public static final int RETRY_PRIORITY_FIELD_NUMBER
- See Also:
- Constant Field Values
-
RETRY_HOST_PREDICATE_FIELD_NUMBER
public static final int RETRY_HOST_PREDICATE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
RETRY_OPTIONS_PREDICATES_FIELD_NUMBER
public static final int RETRY_OPTIONS_PREDICATES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
HOST_SELECTION_RETRY_MAX_ATTEMPTS_FIELD_NUMBER
public static final int HOST_SELECTION_RETRY_MAX_ATTEMPTS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
RETRIABLE_STATUS_CODES_FIELD_NUMBER
public static final int RETRIABLE_STATUS_CODES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
RETRY_BACK_OFF_FIELD_NUMBER
public static final int RETRY_BACK_OFF_FIELD_NUMBER
- See Also:
- Constant Field Values
-
RATE_LIMITED_RETRY_BACK_OFF_FIELD_NUMBER
public static final int RATE_LIMITED_RETRY_BACK_OFF_FIELD_NUMBER
- See Also:
- Constant Field Values
-
RETRIABLE_HEADERS_FIELD_NUMBER
public static final int RETRIABLE_HEADERS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
RETRIABLE_REQUEST_HEADERS_FIELD_NUMBER
public static final int RETRIABLE_REQUEST_HEADERS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getUnknownFields
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
- Specified by:
getUnknownFieldsin interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getRetryOn
public String getRetryOn()
Specifies the conditions under which retry takes place. These are the same conditions documented for :ref:`config_http_filters_router_x-envoy-retry-on` and :ref:`config_http_filters_router_x-envoy-retry-grpc-on`.
string retry_on = 1;- Specified by:
getRetryOnin interfaceRetryPolicyOrBuilder- Returns:
- The retryOn.
-
getRetryOnBytes
public com.google.protobuf.ByteString getRetryOnBytes()
Specifies the conditions under which retry takes place. These are the same conditions documented for :ref:`config_http_filters_router_x-envoy-retry-on` and :ref:`config_http_filters_router_x-envoy-retry-grpc-on`.
string retry_on = 1;- Specified by:
getRetryOnBytesin interfaceRetryPolicyOrBuilder- Returns:
- The bytes for retryOn.
-
hasNumRetries
public boolean hasNumRetries()
Specifies the allowed number of retries. This parameter is optional and defaults to 1. These are the same conditions documented for :ref:`config_http_filters_router_x-envoy-max-retries`.
.google.protobuf.UInt32Value num_retries = 2 [(.udpa.annotations.field_migrate) = { ... }- Specified by:
hasNumRetriesin interfaceRetryPolicyOrBuilder- Returns:
- Whether the numRetries field is set.
-
getNumRetries
public com.google.protobuf.UInt32Value getNumRetries()
Specifies the allowed number of retries. This parameter is optional and defaults to 1. These are the same conditions documented for :ref:`config_http_filters_router_x-envoy-max-retries`.
.google.protobuf.UInt32Value num_retries = 2 [(.udpa.annotations.field_migrate) = { ... }- Specified by:
getNumRetriesin interfaceRetryPolicyOrBuilder- Returns:
- The numRetries.
-
getNumRetriesOrBuilder
public com.google.protobuf.UInt32ValueOrBuilder getNumRetriesOrBuilder()
Specifies the allowed number of retries. This parameter is optional and defaults to 1. These are the same conditions documented for :ref:`config_http_filters_router_x-envoy-max-retries`.
.google.protobuf.UInt32Value num_retries = 2 [(.udpa.annotations.field_migrate) = { ... }- Specified by:
getNumRetriesOrBuilderin interfaceRetryPolicyOrBuilder
-
hasPerTryTimeout
public boolean hasPerTryTimeout()
Specifies a non-zero upstream timeout per retry attempt (including the initial attempt). This parameter is optional. The same conditions documented for :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms` apply. .. note:: If left unspecified, Envoy will use the global :ref:`route timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>` for the request. Consequently, when using a :ref:`5xx <config_http_filters_router_x-envoy-retry-on>` based retry policy, a request that times out will not be retried as the total timeout budget would have been exhausted.
.google.protobuf.Duration per_try_timeout = 3;- Specified by:
hasPerTryTimeoutin interfaceRetryPolicyOrBuilder- Returns:
- Whether the perTryTimeout field is set.
-
getPerTryTimeout
public com.google.protobuf.Duration getPerTryTimeout()
Specifies a non-zero upstream timeout per retry attempt (including the initial attempt). This parameter is optional. The same conditions documented for :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms` apply. .. note:: If left unspecified, Envoy will use the global :ref:`route timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>` for the request. Consequently, when using a :ref:`5xx <config_http_filters_router_x-envoy-retry-on>` based retry policy, a request that times out will not be retried as the total timeout budget would have been exhausted.
.google.protobuf.Duration per_try_timeout = 3;- Specified by:
getPerTryTimeoutin interfaceRetryPolicyOrBuilder- Returns:
- The perTryTimeout.
-
getPerTryTimeoutOrBuilder
public com.google.protobuf.DurationOrBuilder getPerTryTimeoutOrBuilder()
Specifies a non-zero upstream timeout per retry attempt (including the initial attempt). This parameter is optional. The same conditions documented for :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms` apply. .. note:: If left unspecified, Envoy will use the global :ref:`route timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>` for the request. Consequently, when using a :ref:`5xx <config_http_filters_router_x-envoy-retry-on>` based retry policy, a request that times out will not be retried as the total timeout budget would have been exhausted.
.google.protobuf.Duration per_try_timeout = 3;- Specified by:
getPerTryTimeoutOrBuilderin interfaceRetryPolicyOrBuilder
-
hasPerTryIdleTimeout
public boolean hasPerTryIdleTimeout()
Specifies an upstream idle timeout per retry attempt (including the initial attempt). This parameter is optional and if absent there is no per try idle timeout. The semantics of the per try idle timeout are similar to the :ref:`route idle timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>` and :ref:`stream idle timeout <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout>` both enforced by the HTTP connection manager. The difference is that this idle timeout is enforced by the router for each individual attempt and thus after all previous filters have run, as opposed to *before* all previous filters run for the other idle timeouts. This timeout is useful in cases in which total request timeout is bounded by a number of retries and a :ref:`per_try_timeout <envoy_v3_api_field_config.route.v3.RetryPolicy.per_try_timeout>`, but there is a desire to ensure each try is making incremental progress. Note also that similar to :ref:`per_try_timeout <envoy_v3_api_field_config.route.v3.RetryPolicy.per_try_timeout>`, this idle timeout does not start until after both the entire request has been received by the router *and* a connection pool connection has been obtained. Unlike :ref:`per_try_timeout <envoy_v3_api_field_config.route.v3.RetryPolicy.per_try_timeout>`, the idle timer continues once the response starts streaming back to the downstream client. This ensures that response data continues to make progress without using one of the HTTP connection manager idle timeouts.
.google.protobuf.Duration per_try_idle_timeout = 13;- Specified by:
hasPerTryIdleTimeoutin interfaceRetryPolicyOrBuilder- Returns:
- Whether the perTryIdleTimeout field is set.
-
getPerTryIdleTimeout
public com.google.protobuf.Duration getPerTryIdleTimeout()
Specifies an upstream idle timeout per retry attempt (including the initial attempt). This parameter is optional and if absent there is no per try idle timeout. The semantics of the per try idle timeout are similar to the :ref:`route idle timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>` and :ref:`stream idle timeout <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout>` both enforced by the HTTP connection manager. The difference is that this idle timeout is enforced by the router for each individual attempt and thus after all previous filters have run, as opposed to *before* all previous filters run for the other idle timeouts. This timeout is useful in cases in which total request timeout is bounded by a number of retries and a :ref:`per_try_timeout <envoy_v3_api_field_config.route.v3.RetryPolicy.per_try_timeout>`, but there is a desire to ensure each try is making incremental progress. Note also that similar to :ref:`per_try_timeout <envoy_v3_api_field_config.route.v3.RetryPolicy.per_try_timeout>`, this idle timeout does not start until after both the entire request has been received by the router *and* a connection pool connection has been obtained. Unlike :ref:`per_try_timeout <envoy_v3_api_field_config.route.v3.RetryPolicy.per_try_timeout>`, the idle timer continues once the response starts streaming back to the downstream client. This ensures that response data continues to make progress without using one of the HTTP connection manager idle timeouts.
.google.protobuf.Duration per_try_idle_timeout = 13;- Specified by:
getPerTryIdleTimeoutin interfaceRetryPolicyOrBuilder- Returns:
- The perTryIdleTimeout.
-
getPerTryIdleTimeoutOrBuilder
public com.google.protobuf.DurationOrBuilder getPerTryIdleTimeoutOrBuilder()
Specifies an upstream idle timeout per retry attempt (including the initial attempt). This parameter is optional and if absent there is no per try idle timeout. The semantics of the per try idle timeout are similar to the :ref:`route idle timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>` and :ref:`stream idle timeout <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout>` both enforced by the HTTP connection manager. The difference is that this idle timeout is enforced by the router for each individual attempt and thus after all previous filters have run, as opposed to *before* all previous filters run for the other idle timeouts. This timeout is useful in cases in which total request timeout is bounded by a number of retries and a :ref:`per_try_timeout <envoy_v3_api_field_config.route.v3.RetryPolicy.per_try_timeout>`, but there is a desire to ensure each try is making incremental progress. Note also that similar to :ref:`per_try_timeout <envoy_v3_api_field_config.route.v3.RetryPolicy.per_try_timeout>`, this idle timeout does not start until after both the entire request has been received by the router *and* a connection pool connection has been obtained. Unlike :ref:`per_try_timeout <envoy_v3_api_field_config.route.v3.RetryPolicy.per_try_timeout>`, the idle timer continues once the response starts streaming back to the downstream client. This ensures that response data continues to make progress without using one of the HTTP connection manager idle timeouts.
.google.protobuf.Duration per_try_idle_timeout = 13;- Specified by:
getPerTryIdleTimeoutOrBuilderin interfaceRetryPolicyOrBuilder
-
hasRetryPriority
public boolean hasRetryPriority()
Specifies an implementation of a RetryPriority which is used to determine the distribution of load across priorities used for retries. Refer to :ref:`retry plugin configuration <arch_overview_http_retry_plugins>` for more details.
.envoy.config.route.v3.RetryPolicy.RetryPriority retry_priority = 4;- Specified by:
hasRetryPriorityin interfaceRetryPolicyOrBuilder- Returns:
- Whether the retryPriority field is set.
-
getRetryPriority
public RetryPolicy.RetryPriority getRetryPriority()
Specifies an implementation of a RetryPriority which is used to determine the distribution of load across priorities used for retries. Refer to :ref:`retry plugin configuration <arch_overview_http_retry_plugins>` for more details.
.envoy.config.route.v3.RetryPolicy.RetryPriority retry_priority = 4;- Specified by:
getRetryPriorityin interfaceRetryPolicyOrBuilder- Returns:
- The retryPriority.
-
getRetryPriorityOrBuilder
public RetryPolicy.RetryPriorityOrBuilder getRetryPriorityOrBuilder()
Specifies an implementation of a RetryPriority which is used to determine the distribution of load across priorities used for retries. Refer to :ref:`retry plugin configuration <arch_overview_http_retry_plugins>` for more details.
.envoy.config.route.v3.RetryPolicy.RetryPriority retry_priority = 4;- Specified by:
getRetryPriorityOrBuilderin interfaceRetryPolicyOrBuilder
-
getRetryHostPredicateList
public List<RetryPolicy.RetryHostPredicate> getRetryHostPredicateList()
Specifies a collection of RetryHostPredicates that will be consulted when selecting a host for retries. If any of the predicates reject the host, host selection will be reattempted. Refer to :ref:`retry plugin configuration <arch_overview_http_retry_plugins>` for more details.
repeated .envoy.config.route.v3.RetryPolicy.RetryHostPredicate retry_host_predicate = 5;- Specified by:
getRetryHostPredicateListin interfaceRetryPolicyOrBuilder
-
getRetryHostPredicateOrBuilderList
public List<? extends RetryPolicy.RetryHostPredicateOrBuilder> getRetryHostPredicateOrBuilderList()
Specifies a collection of RetryHostPredicates that will be consulted when selecting a host for retries. If any of the predicates reject the host, host selection will be reattempted. Refer to :ref:`retry plugin configuration <arch_overview_http_retry_plugins>` for more details.
repeated .envoy.config.route.v3.RetryPolicy.RetryHostPredicate retry_host_predicate = 5;- Specified by:
getRetryHostPredicateOrBuilderListin interfaceRetryPolicyOrBuilder
-
getRetryHostPredicateCount
public int getRetryHostPredicateCount()
Specifies a collection of RetryHostPredicates that will be consulted when selecting a host for retries. If any of the predicates reject the host, host selection will be reattempted. Refer to :ref:`retry plugin configuration <arch_overview_http_retry_plugins>` for more details.
repeated .envoy.config.route.v3.RetryPolicy.RetryHostPredicate retry_host_predicate = 5;- Specified by:
getRetryHostPredicateCountin interfaceRetryPolicyOrBuilder
-
getRetryHostPredicate
public RetryPolicy.RetryHostPredicate getRetryHostPredicate(int index)
Specifies a collection of RetryHostPredicates that will be consulted when selecting a host for retries. If any of the predicates reject the host, host selection will be reattempted. Refer to :ref:`retry plugin configuration <arch_overview_http_retry_plugins>` for more details.
repeated .envoy.config.route.v3.RetryPolicy.RetryHostPredicate retry_host_predicate = 5;- Specified by:
getRetryHostPredicatein interfaceRetryPolicyOrBuilder
-
getRetryHostPredicateOrBuilder
public RetryPolicy.RetryHostPredicateOrBuilder getRetryHostPredicateOrBuilder(int index)
Specifies a collection of RetryHostPredicates that will be consulted when selecting a host for retries. If any of the predicates reject the host, host selection will be reattempted. Refer to :ref:`retry plugin configuration <arch_overview_http_retry_plugins>` for more details.
repeated .envoy.config.route.v3.RetryPolicy.RetryHostPredicate retry_host_predicate = 5;- Specified by:
getRetryHostPredicateOrBuilderin interfaceRetryPolicyOrBuilder
-
getRetryOptionsPredicatesList
public List<TypedExtensionConfig> getRetryOptionsPredicatesList()
Retry options predicates that will be applied prior to retrying a request. These predicates allow customizing request behavior between retries. [#comment: add [#extension-category: envoy.retry_options_predicates] when there are built-in extensions]
repeated .envoy.config.core.v3.TypedExtensionConfig retry_options_predicates = 12;- Specified by:
getRetryOptionsPredicatesListin interfaceRetryPolicyOrBuilder
-
getRetryOptionsPredicatesOrBuilderList
public List<? extends TypedExtensionConfigOrBuilder> getRetryOptionsPredicatesOrBuilderList()
Retry options predicates that will be applied prior to retrying a request. These predicates allow customizing request behavior between retries. [#comment: add [#extension-category: envoy.retry_options_predicates] when there are built-in extensions]
repeated .envoy.config.core.v3.TypedExtensionConfig retry_options_predicates = 12;- Specified by:
getRetryOptionsPredicatesOrBuilderListin interfaceRetryPolicyOrBuilder
-
getRetryOptionsPredicatesCount
public int getRetryOptionsPredicatesCount()
Retry options predicates that will be applied prior to retrying a request. These predicates allow customizing request behavior between retries. [#comment: add [#extension-category: envoy.retry_options_predicates] when there are built-in extensions]
repeated .envoy.config.core.v3.TypedExtensionConfig retry_options_predicates = 12;- Specified by:
getRetryOptionsPredicatesCountin interfaceRetryPolicyOrBuilder
-
getRetryOptionsPredicates
public TypedExtensionConfig getRetryOptionsPredicates(int index)
Retry options predicates that will be applied prior to retrying a request. These predicates allow customizing request behavior between retries. [#comment: add [#extension-category: envoy.retry_options_predicates] when there are built-in extensions]
repeated .envoy.config.core.v3.TypedExtensionConfig retry_options_predicates = 12;- Specified by:
getRetryOptionsPredicatesin interfaceRetryPolicyOrBuilder
-
getRetryOptionsPredicatesOrBuilder
public TypedExtensionConfigOrBuilder getRetryOptionsPredicatesOrBuilder(int index)
Retry options predicates that will be applied prior to retrying a request. These predicates allow customizing request behavior between retries. [#comment: add [#extension-category: envoy.retry_options_predicates] when there are built-in extensions]
repeated .envoy.config.core.v3.TypedExtensionConfig retry_options_predicates = 12;- Specified by:
getRetryOptionsPredicatesOrBuilderin interfaceRetryPolicyOrBuilder
-
getHostSelectionRetryMaxAttempts
public long getHostSelectionRetryMaxAttempts()
The maximum number of times host selection will be reattempted before giving up, at which point the host that was last selected will be routed to. If unspecified, this will default to retrying once.
int64 host_selection_retry_max_attempts = 6;- Specified by:
getHostSelectionRetryMaxAttemptsin interfaceRetryPolicyOrBuilder- Returns:
- The hostSelectionRetryMaxAttempts.
-
getRetriableStatusCodesList
public List<Integer> getRetriableStatusCodesList()
HTTP status codes that should trigger a retry in addition to those specified by retry_on.
repeated uint32 retriable_status_codes = 7;- Specified by:
getRetriableStatusCodesListin interfaceRetryPolicyOrBuilder- Returns:
- A list containing the retriableStatusCodes.
-
getRetriableStatusCodesCount
public int getRetriableStatusCodesCount()
HTTP status codes that should trigger a retry in addition to those specified by retry_on.
repeated uint32 retriable_status_codes = 7;- Specified by:
getRetriableStatusCodesCountin interfaceRetryPolicyOrBuilder- Returns:
- The count of retriableStatusCodes.
-
getRetriableStatusCodes
public int getRetriableStatusCodes(int index)
HTTP status codes that should trigger a retry in addition to those specified by retry_on.
repeated uint32 retriable_status_codes = 7;- Specified by:
getRetriableStatusCodesin interfaceRetryPolicyOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The retriableStatusCodes at the given index.
-
hasRetryBackOff
public boolean hasRetryBackOff()
Specifies parameters that control exponential retry back off. This parameter is optional, in which case the default base interval is 25 milliseconds or, if set, the current value of the ``upstream.base_retry_backoff_ms`` runtime parameter. The default maximum interval is 10 times the base interval. The documentation for :ref:`config_http_filters_router_x-envoy-max-retries` describes Envoy's back-off algorithm.
.envoy.config.route.v3.RetryPolicy.RetryBackOff retry_back_off = 8;- Specified by:
hasRetryBackOffin interfaceRetryPolicyOrBuilder- Returns:
- Whether the retryBackOff field is set.
-
getRetryBackOff
public RetryPolicy.RetryBackOff getRetryBackOff()
Specifies parameters that control exponential retry back off. This parameter is optional, in which case the default base interval is 25 milliseconds or, if set, the current value of the ``upstream.base_retry_backoff_ms`` runtime parameter. The default maximum interval is 10 times the base interval. The documentation for :ref:`config_http_filters_router_x-envoy-max-retries` describes Envoy's back-off algorithm.
.envoy.config.route.v3.RetryPolicy.RetryBackOff retry_back_off = 8;- Specified by:
getRetryBackOffin interfaceRetryPolicyOrBuilder- Returns:
- The retryBackOff.
-
getRetryBackOffOrBuilder
public RetryPolicy.RetryBackOffOrBuilder getRetryBackOffOrBuilder()
Specifies parameters that control exponential retry back off. This parameter is optional, in which case the default base interval is 25 milliseconds or, if set, the current value of the ``upstream.base_retry_backoff_ms`` runtime parameter. The default maximum interval is 10 times the base interval. The documentation for :ref:`config_http_filters_router_x-envoy-max-retries` describes Envoy's back-off algorithm.
.envoy.config.route.v3.RetryPolicy.RetryBackOff retry_back_off = 8;- Specified by:
getRetryBackOffOrBuilderin interfaceRetryPolicyOrBuilder
-
hasRateLimitedRetryBackOff
public boolean hasRateLimitedRetryBackOff()
Specifies parameters that control a retry back-off strategy that is used when the request is rate limited by the upstream server. The server may return a response header like ``Retry-After`` or ``X-RateLimit-Reset`` to provide feedback to the client on how long to wait before retrying. If configured, this back-off strategy will be used instead of the default exponential back off strategy (configured using ``retry_back_off``) whenever a response includes the matching headers.
.envoy.config.route.v3.RetryPolicy.RateLimitedRetryBackOff rate_limited_retry_back_off = 11;- Specified by:
hasRateLimitedRetryBackOffin interfaceRetryPolicyOrBuilder- Returns:
- Whether the rateLimitedRetryBackOff field is set.
-
getRateLimitedRetryBackOff
public RetryPolicy.RateLimitedRetryBackOff getRateLimitedRetryBackOff()
Specifies parameters that control a retry back-off strategy that is used when the request is rate limited by the upstream server. The server may return a response header like ``Retry-After`` or ``X-RateLimit-Reset`` to provide feedback to the client on how long to wait before retrying. If configured, this back-off strategy will be used instead of the default exponential back off strategy (configured using ``retry_back_off``) whenever a response includes the matching headers.
.envoy.config.route.v3.RetryPolicy.RateLimitedRetryBackOff rate_limited_retry_back_off = 11;- Specified by:
getRateLimitedRetryBackOffin interfaceRetryPolicyOrBuilder- Returns:
- The rateLimitedRetryBackOff.
-
getRateLimitedRetryBackOffOrBuilder
public RetryPolicy.RateLimitedRetryBackOffOrBuilder getRateLimitedRetryBackOffOrBuilder()
Specifies parameters that control a retry back-off strategy that is used when the request is rate limited by the upstream server. The server may return a response header like ``Retry-After`` or ``X-RateLimit-Reset`` to provide feedback to the client on how long to wait before retrying. If configured, this back-off strategy will be used instead of the default exponential back off strategy (configured using ``retry_back_off``) whenever a response includes the matching headers.
.envoy.config.route.v3.RetryPolicy.RateLimitedRetryBackOff rate_limited_retry_back_off = 11;- Specified by:
getRateLimitedRetryBackOffOrBuilderin interfaceRetryPolicyOrBuilder
-
getRetriableHeadersList
public List<HeaderMatcher> getRetriableHeadersList()
HTTP response headers that trigger a retry if present in the response. A retry will be triggered if any of the header matches match the upstream response headers. The field is only consulted if 'retriable-headers' retry policy is active.
repeated .envoy.config.route.v3.HeaderMatcher retriable_headers = 9;- Specified by:
getRetriableHeadersListin interfaceRetryPolicyOrBuilder
-
getRetriableHeadersOrBuilderList
public List<? extends HeaderMatcherOrBuilder> getRetriableHeadersOrBuilderList()
HTTP response headers that trigger a retry if present in the response. A retry will be triggered if any of the header matches match the upstream response headers. The field is only consulted if 'retriable-headers' retry policy is active.
repeated .envoy.config.route.v3.HeaderMatcher retriable_headers = 9;- Specified by:
getRetriableHeadersOrBuilderListin interfaceRetryPolicyOrBuilder
-
getRetriableHeadersCount
public int getRetriableHeadersCount()
HTTP response headers that trigger a retry if present in the response. A retry will be triggered if any of the header matches match the upstream response headers. The field is only consulted if 'retriable-headers' retry policy is active.
repeated .envoy.config.route.v3.HeaderMatcher retriable_headers = 9;- Specified by:
getRetriableHeadersCountin interfaceRetryPolicyOrBuilder
-
getRetriableHeaders
public HeaderMatcher getRetriableHeaders(int index)
HTTP response headers that trigger a retry if present in the response. A retry will be triggered if any of the header matches match the upstream response headers. The field is only consulted if 'retriable-headers' retry policy is active.
repeated .envoy.config.route.v3.HeaderMatcher retriable_headers = 9;- Specified by:
getRetriableHeadersin interfaceRetryPolicyOrBuilder
-
getRetriableHeadersOrBuilder
public HeaderMatcherOrBuilder getRetriableHeadersOrBuilder(int index)
HTTP response headers that trigger a retry if present in the response. A retry will be triggered if any of the header matches match the upstream response headers. The field is only consulted if 'retriable-headers' retry policy is active.
repeated .envoy.config.route.v3.HeaderMatcher retriable_headers = 9;- Specified by:
getRetriableHeadersOrBuilderin interfaceRetryPolicyOrBuilder
-
getRetriableRequestHeadersList
public List<HeaderMatcher> getRetriableRequestHeadersList()
HTTP headers which must be present in the request for retries to be attempted.
repeated .envoy.config.route.v3.HeaderMatcher retriable_request_headers = 10;- Specified by:
getRetriableRequestHeadersListin interfaceRetryPolicyOrBuilder
-
getRetriableRequestHeadersOrBuilderList
public List<? extends HeaderMatcherOrBuilder> getRetriableRequestHeadersOrBuilderList()
HTTP headers which must be present in the request for retries to be attempted.
repeated .envoy.config.route.v3.HeaderMatcher retriable_request_headers = 10;- Specified by:
getRetriableRequestHeadersOrBuilderListin interfaceRetryPolicyOrBuilder
-
getRetriableRequestHeadersCount
public int getRetriableRequestHeadersCount()
HTTP headers which must be present in the request for retries to be attempted.
repeated .envoy.config.route.v3.HeaderMatcher retriable_request_headers = 10;- Specified by:
getRetriableRequestHeadersCountin interfaceRetryPolicyOrBuilder
-
getRetriableRequestHeaders
public HeaderMatcher getRetriableRequestHeaders(int index)
HTTP headers which must be present in the request for retries to be attempted.
repeated .envoy.config.route.v3.HeaderMatcher retriable_request_headers = 10;- Specified by:
getRetriableRequestHeadersin interfaceRetryPolicyOrBuilder
-
getRetriableRequestHeadersOrBuilder
public HeaderMatcherOrBuilder getRetriableRequestHeadersOrBuilder(int index)
HTTP headers which must be present in the request for retries to be attempted.
repeated .envoy.config.route.v3.HeaderMatcher retriable_request_headers = 10;- Specified by:
getRetriableRequestHeadersOrBuilderin interfaceRetryPolicyOrBuilder
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static RetryPolicy parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RetryPolicy parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RetryPolicy parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RetryPolicy parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RetryPolicy parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RetryPolicy parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RetryPolicy parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static RetryPolicy parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static RetryPolicy parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static RetryPolicy parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static RetryPolicy parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static RetryPolicy parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public RetryPolicy.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static RetryPolicy.Builder newBuilder()
-
newBuilder
public static RetryPolicy.Builder newBuilder(RetryPolicy prototype)
-
toBuilder
public RetryPolicy.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected RetryPolicy.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static RetryPolicy getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<RetryPolicy> parser()
-
getParserForType
public com.google.protobuf.Parser<RetryPolicy> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public RetryPolicy getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-