
target.apidocs.com.google.api.services.compute.model.HttpRetryPolicy.html Maven / Gradle / Ivy
HttpRetryPolicy (Compute Engine API beta-rev20220312-1.32.1)
com.google.api.services.compute.model
Class HttpRetryPolicy
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.compute.model.HttpRetryPolicy
-
public final class HttpRetryPolicy
extends GenericJson
The retry policy associates with HttpRouteRule
This is the Java data model class that specifies how to parse/serialize into the JSON that is
transmitted over HTTP when working with the Compute Engine API. For a detailed explanation see:
https://developers.google.com/api-client-library/java/google-http-java-client/json
- Author:
- Google, Inc.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Constructor and Description
HttpRetryPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
HttpRetryPolicy
clone()
Long
getNumRetries()
Specifies the allowed number retries.
Duration
getPerTryTimeout()
Specifies a non-zero timeout per retry attempt.
List<String>
getRetryConditions()
Specifies one or more conditions when this retry policy applies.
HttpRetryPolicy
set(String fieldName,
Object value)
HttpRetryPolicy
setNumRetries(Long numRetries)
Specifies the allowed number retries.
HttpRetryPolicy
setPerTryTimeout(Duration perTryTimeout)
Specifies a non-zero timeout per retry attempt.
HttpRetryPolicy
setRetryConditions(List<String> retryConditions)
Specifies one or more conditions when this retry policy applies.
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
Method Detail
-
getNumRetries
public Long getNumRetries()
Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1.
- Returns:
- value or
null
for none
-
setNumRetries
public HttpRetryPolicy setNumRetries(Long numRetries)
Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1.
- Parameters:
numRetries
- numRetries or null
for none
-
getPerTryTimeout
public Duration getPerTryTimeout()
Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in
the HttpRouteAction field. If timeout in the HttpRouteAction field is not set, this field uses
the largest timeout among all backend services associated with the route. Not supported when
the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to
true.
- Returns:
- value or
null
for none
-
setPerTryTimeout
public HttpRetryPolicy setPerTryTimeout(Duration perTryTimeout)
Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in
the HttpRouteAction field. If timeout in the HttpRouteAction field is not set, this field uses
the largest timeout among all backend services associated with the route. Not supported when
the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to
true.
- Parameters:
perTryTimeout
- perTryTimeout or null
for none
-
getRetryConditions
public List<String> getRetryConditions()
Specifies one or more conditions when this retry policy applies. Valid values are: - 5xx: retry
is attempted if the instance or endpoint responds with any 5xx response code, or if the
instance or endpoint does not respond at all. For example, disconnects, reset, read timeout,
connection failure, and refused streams. - gateway-error: Similar to 5xx, but only applies to
response codes 502, 503 or 504. - connect-failure: a retry is attempted on failures connecting
to the instance or endpoint. For example, connection timeouts. - retriable-4xx: a retry is
attempted if the instance or endpoint responds with a 4xx response code. The only error that
you can retry is error code 409. - refused-stream: a retry is attempted if the instance or
endpoint resets the stream with a REFUSED_STREAM error code. This reset type indicates that it
is safe to retry. - cancelled: a retry is attempted if the gRPC status code in the response
header is set to cancelled. - deadline-exceeded: a retry is attempted if the gRPC status code
in the response header is set to deadline-exceeded. - internal: a retry is attempted if the
gRPC status code in the response header is set to internal. - resource-exhausted: a retry is
attempted if the gRPC status code in the response header is set to resource-exhausted. -
unavailable: a retry is attempted if the gRPC status code in the response header is set to
unavailable. Only the following codes are supported when the URL map is bound to target gRPC
proxy that has validateForProxyless field set to true. - cancelled - deadline-exceeded -
internal - resource-exhausted - unavailable
- Returns:
- value or
null
for none
-
setRetryConditions
public HttpRetryPolicy setRetryConditions(List<String> retryConditions)
Specifies one or more conditions when this retry policy applies. Valid values are: - 5xx: retry
is attempted if the instance or endpoint responds with any 5xx response code, or if the
instance or endpoint does not respond at all. For example, disconnects, reset, read timeout,
connection failure, and refused streams. - gateway-error: Similar to 5xx, but only applies to
response codes 502, 503 or 504. - connect-failure: a retry is attempted on failures connecting
to the instance or endpoint. For example, connection timeouts. - retriable-4xx: a retry is
attempted if the instance or endpoint responds with a 4xx response code. The only error that
you can retry is error code 409. - refused-stream: a retry is attempted if the instance or
endpoint resets the stream with a REFUSED_STREAM error code. This reset type indicates that it
is safe to retry. - cancelled: a retry is attempted if the gRPC status code in the response
header is set to cancelled. - deadline-exceeded: a retry is attempted if the gRPC status code
in the response header is set to deadline-exceeded. - internal: a retry is attempted if the
gRPC status code in the response header is set to internal. - resource-exhausted: a retry is
attempted if the gRPC status code in the response header is set to resource-exhausted. -
unavailable: a retry is attempted if the gRPC status code in the response header is set to
unavailable. Only the following codes are supported when the URL map is bound to target gRPC
proxy that has validateForProxyless field set to true. - cancelled - deadline-exceeded -
internal - resource-exhausted - unavailable
- Parameters:
retryConditions
- retryConditions or null
for none
-
set
public HttpRetryPolicy set(String fieldName,
Object value)
- Overrides:
set
in class GenericJson
-
clone
public HttpRetryPolicy clone()
- Overrides:
clone
in class GenericJson
Copyright © 2011–2022 Google. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy