- 1.65.0 (latest)
- 1.64.0
- 1.63.0
- 1.62.0
- 1.61.0
- 1.59.0
- 1.58.0
- 1.57.0
- 1.56.0
- 1.55.0
- 1.54.0
- 1.53.0
- 1.52.0
- 1.51.0
- 1.50.0
- 1.49.0
- 1.47.0
- 1.46.0
- 1.45.0
- 1.44.0
- 1.43.0
- 1.42.0
- 1.41.0
- 1.40.0
- 1.39.0
- 1.38.0
- 1.37.0
- 1.34.0
- 1.33.0
- 1.32.0
- 1.31.0
- 1.30.0
- 1.29.0
- 1.28.0
- 1.27.0
- 1.26.0
- 1.25.0
- 1.24.0
- 1.23.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.1
- 1.11.0
- 1.9.1
- 1.8.1
- 1.7.2
- 1.6.0-beta
public static final class HttpRetryPolicy.Builder extends GeneratedMessageV3.Builder<HttpRetryPolicy.Builder> implements HttpRetryPolicyOrBuilder
The retry policy associates with HttpRouteRule
Protobuf type google.cloud.compute.v1.HttpRetryPolicy
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > HttpRetryPolicy.BuilderImplements
HttpRetryPolicyOrBuilderMethods
addAllRetryConditions(Iterable<String> values)
public HttpRetryPolicy.Builder addAllRetryConditions(Iterable<String> values)
Specifies one or more conditions when this retry policy applies. Valid values are: - 5xx: Retry will be attempted if the instance or endpoint responds with any 5xx response code, or if the instance or endpoint does not respond at all, 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 will be attempted on failures connecting to the instance or endpoint, for example due to connection timeouts. - retriable-4xx: A retry will be attempted if the instance or endpoint responds with a retriable 4xx response code. Currently the only retriable error supported is 409. - refused-stream: A retry will be 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 will be attempted if the gRPC status code in the response header is set to cancelled. - deadline-exceeded: A retry will be attempted if the gRPC status code in the response header is set to deadline-exceeded. - internal: A retry will be attempted if the gRPC status code in the response header is set to internal. - resource-exhausted: A retry will be attempted if the gRPC status code in the response header is set to resource-exhausted. - unavailable: A retry will be attempted if the gRPC status code in the response header is set to unavailable.
repeated string retry_conditions = 28815535;
Name | Description |
values | Iterable<String> The retryConditions to add. |
Type | Description |
HttpRetryPolicy.Builder | This builder for chaining. |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public HttpRetryPolicy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
HttpRetryPolicy.Builder |
addRetryConditions(String value)
public HttpRetryPolicy.Builder addRetryConditions(String value)
Specifies one or more conditions when this retry policy applies. Valid values are: - 5xx: Retry will be attempted if the instance or endpoint responds with any 5xx response code, or if the instance or endpoint does not respond at all, 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 will be attempted on failures connecting to the instance or endpoint, for example due to connection timeouts. - retriable-4xx: A retry will be attempted if the instance or endpoint responds with a retriable 4xx response code. Currently the only retriable error supported is 409. - refused-stream: A retry will be 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 will be attempted if the gRPC status code in the response header is set to cancelled. - deadline-exceeded: A retry will be attempted if the gRPC status code in the response header is set to deadline-exceeded. - internal: A retry will be attempted if the gRPC status code in the response header is set to internal. - resource-exhausted: A retry will be attempted if the gRPC status code in the response header is set to resource-exhausted. - unavailable: A retry will be attempted if the gRPC status code in the response header is set to unavailable.
repeated string retry_conditions = 28815535;
Name | Description |
value | String The retryConditions to add. |
Type | Description |
HttpRetryPolicy.Builder | This builder for chaining. |
addRetryConditionsBytes(ByteString value)
public HttpRetryPolicy.Builder addRetryConditionsBytes(ByteString value)
Specifies one or more conditions when this retry policy applies. Valid values are: - 5xx: Retry will be attempted if the instance or endpoint responds with any 5xx response code, or if the instance or endpoint does not respond at all, 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 will be attempted on failures connecting to the instance or endpoint, for example due to connection timeouts. - retriable-4xx: A retry will be attempted if the instance or endpoint responds with a retriable 4xx response code. Currently the only retriable error supported is 409. - refused-stream: A retry will be 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 will be attempted if the gRPC status code in the response header is set to cancelled. - deadline-exceeded: A retry will be attempted if the gRPC status code in the response header is set to deadline-exceeded. - internal: A retry will be attempted if the gRPC status code in the response header is set to internal. - resource-exhausted: A retry will be attempted if the gRPC status code in the response header is set to resource-exhausted. - unavailable: A retry will be attempted if the gRPC status code in the response header is set to unavailable.
repeated string retry_conditions = 28815535;
Name | Description |
value | ByteString The bytes of the retryConditions to add. |
Type | Description |
HttpRetryPolicy.Builder | This builder for chaining. |
build()
public HttpRetryPolicy build()
Type | Description |
HttpRetryPolicy |
buildPartial()
public HttpRetryPolicy buildPartial()
Type | Description |
HttpRetryPolicy |
clear()
public HttpRetryPolicy.Builder clear()
Type | Description |
HttpRetryPolicy.Builder |
clearField(Descriptors.FieldDescriptor field)
public HttpRetryPolicy.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field | FieldDescriptor |
Type | Description |
HttpRetryPolicy.Builder |
clearNumRetries()
public HttpRetryPolicy.Builder clearNumRetries()
Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1.
optional uint32 num_retries = 251680141;
Type | Description |
HttpRetryPolicy.Builder | This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public HttpRetryPolicy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof | OneofDescriptor |
Type | Description |
HttpRetryPolicy.Builder |
clearPerTryTimeout()
public HttpRetryPolicy.Builder clearPerTryTimeout()
Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
optional .google.cloud.compute.v1.Duration per_try_timeout = 280041147;
Type | Description |
HttpRetryPolicy.Builder |
clearRetryConditions()
public HttpRetryPolicy.Builder clearRetryConditions()
Specifies one or more conditions when this retry policy applies. Valid values are: - 5xx: Retry will be attempted if the instance or endpoint responds with any 5xx response code, or if the instance or endpoint does not respond at all, 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 will be attempted on failures connecting to the instance or endpoint, for example due to connection timeouts. - retriable-4xx: A retry will be attempted if the instance or endpoint responds with a retriable 4xx response code. Currently the only retriable error supported is 409. - refused-stream: A retry will be 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 will be attempted if the gRPC status code in the response header is set to cancelled. - deadline-exceeded: A retry will be attempted if the gRPC status code in the response header is set to deadline-exceeded. - internal: A retry will be attempted if the gRPC status code in the response header is set to internal. - resource-exhausted: A retry will be attempted if the gRPC status code in the response header is set to resource-exhausted. - unavailable: A retry will be attempted if the gRPC status code in the response header is set to unavailable.
repeated string retry_conditions = 28815535;
Type | Description |
HttpRetryPolicy.Builder | This builder for chaining. |
clone()
public HttpRetryPolicy.Builder clone()
Type | Description |
HttpRetryPolicy.Builder |
getDefaultInstanceForType()
public HttpRetryPolicy getDefaultInstanceForType()
Type | Description |
HttpRetryPolicy |
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Type | Description |
Descriptor |
getNumRetries()
public int getNumRetries()
Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1.
optional uint32 num_retries = 251680141;
Type | Description |
int | The numRetries. |
getPerTryTimeout()
public Duration getPerTryTimeout()
Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
optional .google.cloud.compute.v1.Duration per_try_timeout = 280041147;
Type | Description |
Duration | The perTryTimeout. |
getPerTryTimeoutBuilder()
public Duration.Builder getPerTryTimeoutBuilder()
Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
optional .google.cloud.compute.v1.Duration per_try_timeout = 280041147;
Type | Description |
Duration.Builder |
getPerTryTimeoutOrBuilder()
public DurationOrBuilder getPerTryTimeoutOrBuilder()
Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
optional .google.cloud.compute.v1.Duration per_try_timeout = 280041147;
Type | Description |
DurationOrBuilder |
getRetryConditions(int index)
public String getRetryConditions(int index)
Specifies one or more conditions when this retry policy applies. Valid values are: - 5xx: Retry will be attempted if the instance or endpoint responds with any 5xx response code, or if the instance or endpoint does not respond at all, 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 will be attempted on failures connecting to the instance or endpoint, for example due to connection timeouts. - retriable-4xx: A retry will be attempted if the instance or endpoint responds with a retriable 4xx response code. Currently the only retriable error supported is 409. - refused-stream: A retry will be 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 will be attempted if the gRPC status code in the response header is set to cancelled. - deadline-exceeded: A retry will be attempted if the gRPC status code in the response header is set to deadline-exceeded. - internal: A retry will be attempted if the gRPC status code in the response header is set to internal. - resource-exhausted: A retry will be attempted if the gRPC status code in the response header is set to resource-exhausted. - unavailable: A retry will be attempted if the gRPC status code in the response header is set to unavailable.
repeated string retry_conditions = 28815535;
Name | Description |
index | int The index of the element to return. |
Type | Description |
String | The retryConditions at the given index. |
getRetryConditionsBytes(int index)
public ByteString getRetryConditionsBytes(int index)
Specifies one or more conditions when this retry policy applies. Valid values are: - 5xx: Retry will be attempted if the instance or endpoint responds with any 5xx response code, or if the instance or endpoint does not respond at all, 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 will be attempted on failures connecting to the instance or endpoint, for example due to connection timeouts. - retriable-4xx: A retry will be attempted if the instance or endpoint responds with a retriable 4xx response code. Currently the only retriable error supported is 409. - refused-stream: A retry will be 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 will be attempted if the gRPC status code in the response header is set to cancelled. - deadline-exceeded: A retry will be attempted if the gRPC status code in the response header is set to deadline-exceeded. - internal: A retry will be attempted if the gRPC status code in the response header is set to internal. - resource-exhausted: A retry will be attempted if the gRPC status code in the response header is set to resource-exhausted. - unavailable: A retry will be attempted if the gRPC status code in the response header is set to unavailable.
repeated string retry_conditions = 28815535;
Name | Description |
index | int The index of the value to return. |
Type | Description |
ByteString | The bytes of the retryConditions at the given index. |
getRetryConditionsCount()
public int getRetryConditionsCount()
Specifies one or more conditions when this retry policy applies. Valid values are: - 5xx: Retry will be attempted if the instance or endpoint responds with any 5xx response code, or if the instance or endpoint does not respond at all, 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 will be attempted on failures connecting to the instance or endpoint, for example due to connection timeouts. - retriable-4xx: A retry will be attempted if the instance or endpoint responds with a retriable 4xx response code. Currently the only retriable error supported is 409. - refused-stream: A retry will be 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 will be attempted if the gRPC status code in the response header is set to cancelled. - deadline-exceeded: A retry will be attempted if the gRPC status code in the response header is set to deadline-exceeded. - internal: A retry will be attempted if the gRPC status code in the response header is set to internal. - resource-exhausted: A retry will be attempted if the gRPC status code in the response header is set to resource-exhausted. - unavailable: A retry will be attempted if the gRPC status code in the response header is set to unavailable.
repeated string retry_conditions = 28815535;
Type | Description |
int | The count of retryConditions. |
getRetryConditionsList()
public ProtocolStringList getRetryConditionsList()
Specifies one or more conditions when this retry policy applies. Valid values are: - 5xx: Retry will be attempted if the instance or endpoint responds with any 5xx response code, or if the instance or endpoint does not respond at all, 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 will be attempted on failures connecting to the instance or endpoint, for example due to connection timeouts. - retriable-4xx: A retry will be attempted if the instance or endpoint responds with a retriable 4xx response code. Currently the only retriable error supported is 409. - refused-stream: A retry will be 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 will be attempted if the gRPC status code in the response header is set to cancelled. - deadline-exceeded: A retry will be attempted if the gRPC status code in the response header is set to deadline-exceeded. - internal: A retry will be attempted if the gRPC status code in the response header is set to internal. - resource-exhausted: A retry will be attempted if the gRPC status code in the response header is set to resource-exhausted. - unavailable: A retry will be attempted if the gRPC status code in the response header is set to unavailable.
repeated string retry_conditions = 28815535;
Type | Description |
ProtocolStringList | A list containing the retryConditions. |
hasNumRetries()
public boolean hasNumRetries()
Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1.
optional uint32 num_retries = 251680141;
Type | Description |
boolean | Whether the numRetries field is set. |
hasPerTryTimeout()
public boolean hasPerTryTimeout()
Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
optional .google.cloud.compute.v1.Duration per_try_timeout = 280041147;
Type | Description |
boolean | Whether the perTryTimeout field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
mergeFrom(HttpRetryPolicy other)
public HttpRetryPolicy.Builder mergeFrom(HttpRetryPolicy other)
Name | Description |
other | HttpRetryPolicy |
Type | Description |
HttpRetryPolicy.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public HttpRetryPolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
HttpRetryPolicy.Builder |
Type | Description |
IOException |
mergeFrom(Message other)
public HttpRetryPolicy.Builder mergeFrom(Message other)
Name | Description |
other | Message |
Type | Description |
HttpRetryPolicy.Builder |
mergePerTryTimeout(Duration value)
public HttpRetryPolicy.Builder mergePerTryTimeout(Duration value)
Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
optional .google.cloud.compute.v1.Duration per_try_timeout = 280041147;
Name | Description |
value | Duration |
Type | Description |
HttpRetryPolicy.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final HttpRetryPolicy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
HttpRetryPolicy.Builder |
setField(Descriptors.FieldDescriptor field, Object value)
public HttpRetryPolicy.Builder setField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
HttpRetryPolicy.Builder |
setNumRetries(int value)
public HttpRetryPolicy.Builder setNumRetries(int value)
Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1.
optional uint32 num_retries = 251680141;
Name | Description |
value | int The numRetries to set. |
Type | Description |
HttpRetryPolicy.Builder | This builder for chaining. |
setPerTryTimeout(Duration value)
public HttpRetryPolicy.Builder setPerTryTimeout(Duration value)
Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
optional .google.cloud.compute.v1.Duration per_try_timeout = 280041147;
Name | Description |
value | Duration |
Type | Description |
HttpRetryPolicy.Builder |
setPerTryTimeout(Duration.Builder builderForValue)
public HttpRetryPolicy.Builder setPerTryTimeout(Duration.Builder builderForValue)
Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
optional .google.cloud.compute.v1.Duration per_try_timeout = 280041147;
Name | Description |
builderForValue | Duration.Builder |
Type | Description |
HttpRetryPolicy.Builder |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public HttpRetryPolicy.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Type | Description |
HttpRetryPolicy.Builder |
setRetryConditions(int index, String value)
public HttpRetryPolicy.Builder setRetryConditions(int index, String value)
Specifies one or more conditions when this retry policy applies. Valid values are: - 5xx: Retry will be attempted if the instance or endpoint responds with any 5xx response code, or if the instance or endpoint does not respond at all, 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 will be attempted on failures connecting to the instance or endpoint, for example due to connection timeouts. - retriable-4xx: A retry will be attempted if the instance or endpoint responds with a retriable 4xx response code. Currently the only retriable error supported is 409. - refused-stream: A retry will be 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 will be attempted if the gRPC status code in the response header is set to cancelled. - deadline-exceeded: A retry will be attempted if the gRPC status code in the response header is set to deadline-exceeded. - internal: A retry will be attempted if the gRPC status code in the response header is set to internal. - resource-exhausted: A retry will be attempted if the gRPC status code in the response header is set to resource-exhausted. - unavailable: A retry will be attempted if the gRPC status code in the response header is set to unavailable.
repeated string retry_conditions = 28815535;
Name | Description |
index | int The index to set the value at. |
value | String The retryConditions to set. |
Type | Description |
HttpRetryPolicy.Builder | This builder for chaining. |
setUnknownFields(UnknownFieldSet unknownFields)
public final HttpRetryPolicy.Builder setUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
HttpRetryPolicy.Builder |