public static final class HttpRoute.RetryPolicy.Builder extends GeneratedMessageV3.Builder<HttpRoute.RetryPolicy.Builder> implements HttpRoute.RetryPolicyOrBuilder
The specifications for retries.
Protobuf type google.cloud.networkservices.v1.HttpRoute.RetryPolicy
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > HttpRoute.RetryPolicy.BuilderImplements
HttpRoute.RetryPolicyOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
Methods
addAllRetryConditions(Iterable<String> values)
public HttpRoute.RetryPolicy.Builder addAllRetryConditions(Iterable<String> values)
Specifies one or more conditions when this retry policy applies. Valid values are: 5xx: Proxy will attempt a retry if the destination service responds with any 5xx response code, of if the destination service does not respond at all, example: disconnect, reset, read timeout, connection failure and refused streams.
gateway-error: Similar to 5xx, but only applies to response codes 502, 503, 504.
reset: Proxy will attempt a retry if the destination service does not respond at all (disconnect/reset/read timeout)
connect-failure: Proxy will retry on failures connecting to destination for example due to connection timeouts.
retriable-4xx: Proxy will retry fro retriable 4xx response codes. Currently the only retriable error supported is 409.
refused-stream: Proxy will retry if the destination resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
repeated string retry_conditions = 1;
Parameter | |
---|---|
Name | Description |
values |
Iterable<String> The retryConditions to add. |
Returns | |
---|---|
Type | Description |
HttpRoute.RetryPolicy.Builder |
This builder for chaining. |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public HttpRoute.RetryPolicy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
value |
Object |
Returns | |
---|---|
Type | Description |
HttpRoute.RetryPolicy.Builder |
addRetryConditions(String value)
public HttpRoute.RetryPolicy.Builder addRetryConditions(String value)
Specifies one or more conditions when this retry policy applies. Valid values are: 5xx: Proxy will attempt a retry if the destination service responds with any 5xx response code, of if the destination service does not respond at all, example: disconnect, reset, read timeout, connection failure and refused streams.
gateway-error: Similar to 5xx, but only applies to response codes 502, 503, 504.
reset: Proxy will attempt a retry if the destination service does not respond at all (disconnect/reset/read timeout)
connect-failure: Proxy will retry on failures connecting to destination for example due to connection timeouts.
retriable-4xx: Proxy will retry fro retriable 4xx response codes. Currently the only retriable error supported is 409.
refused-stream: Proxy will retry if the destination resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
repeated string retry_conditions = 1;
Parameter | |
---|---|
Name | Description |
value |
String The retryConditions to add. |
Returns | |
---|---|
Type | Description |
HttpRoute.RetryPolicy.Builder |
This builder for chaining. |
addRetryConditionsBytes(ByteString value)
public HttpRoute.RetryPolicy.Builder addRetryConditionsBytes(ByteString value)
Specifies one or more conditions when this retry policy applies. Valid values are: 5xx: Proxy will attempt a retry if the destination service responds with any 5xx response code, of if the destination service does not respond at all, example: disconnect, reset, read timeout, connection failure and refused streams.
gateway-error: Similar to 5xx, but only applies to response codes 502, 503, 504.
reset: Proxy will attempt a retry if the destination service does not respond at all (disconnect/reset/read timeout)
connect-failure: Proxy will retry on failures connecting to destination for example due to connection timeouts.
retriable-4xx: Proxy will retry fro retriable 4xx response codes. Currently the only retriable error supported is 409.
refused-stream: Proxy will retry if the destination resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
repeated string retry_conditions = 1;
Parameter | |
---|---|
Name | Description |
value |
ByteString The bytes of the retryConditions to add. |
Returns | |
---|---|
Type | Description |
HttpRoute.RetryPolicy.Builder |
This builder for chaining. |
build()
public HttpRoute.RetryPolicy build()
Returns | |
---|---|
Type | Description |
HttpRoute.RetryPolicy |
buildPartial()
public HttpRoute.RetryPolicy buildPartial()
Returns | |
---|---|
Type | Description |
HttpRoute.RetryPolicy |
clear()
public HttpRoute.RetryPolicy.Builder clear()
Returns | |
---|---|
Type | Description |
HttpRoute.RetryPolicy.Builder |
clearField(Descriptors.FieldDescriptor field)
public HttpRoute.RetryPolicy.Builder clearField(Descriptors.FieldDescriptor field)
Parameter | |
---|---|
Name | Description |
field |
FieldDescriptor |
Returns | |
---|---|
Type | Description |
HttpRoute.RetryPolicy.Builder |
clearNumRetries()
public HttpRoute.RetryPolicy.Builder clearNumRetries()
Specifies the allowed number of retries. This number must be > 0. If not specified, default to 1.
int32 num_retries = 2;
Returns | |
---|---|
Type | Description |
HttpRoute.RetryPolicy.Builder |
This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public HttpRoute.RetryPolicy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter | |
---|---|
Name | Description |
oneof |
OneofDescriptor |
Returns | |
---|---|
Type | Description |
HttpRoute.RetryPolicy.Builder |
clearPerTryTimeout()
public HttpRoute.RetryPolicy.Builder clearPerTryTimeout()
Specifies a non-zero timeout per retry attempt.
.google.protobuf.Duration per_try_timeout = 3;
Returns | |
---|---|
Type | Description |
HttpRoute.RetryPolicy.Builder |
clearRetryConditions()
public HttpRoute.RetryPolicy.Builder clearRetryConditions()
Specifies one or more conditions when this retry policy applies. Valid values are: 5xx: Proxy will attempt a retry if the destination service responds with any 5xx response code, of if the destination service does not respond at all, example: disconnect, reset, read timeout, connection failure and refused streams.
gateway-error: Similar to 5xx, but only applies to response codes 502, 503, 504.
reset: Proxy will attempt a retry if the destination service does not respond at all (disconnect/reset/read timeout)
connect-failure: Proxy will retry on failures connecting to destination for example due to connection timeouts.
retriable-4xx: Proxy will retry fro retriable 4xx response codes. Currently the only retriable error supported is 409.
refused-stream: Proxy will retry if the destination resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
repeated string retry_conditions = 1;
Returns | |
---|---|
Type | Description |
HttpRoute.RetryPolicy.Builder |
This builder for chaining. |
clone()
public HttpRoute.RetryPolicy.Builder clone()
Returns | |
---|---|
Type | Description |
HttpRoute.RetryPolicy.Builder |
getDefaultInstanceForType()
public HttpRoute.RetryPolicy getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
HttpRoute.RetryPolicy |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns | |
---|---|
Type | Description |
Descriptor |
getNumRetries()
public int getNumRetries()
Specifies the allowed number of retries. This number must be > 0. If not specified, default to 1.
int32 num_retries = 2;
Returns | |
---|---|
Type | Description |
int |
The numRetries. |
getPerTryTimeout()
public Duration getPerTryTimeout()
Specifies a non-zero timeout per retry attempt.
.google.protobuf.Duration per_try_timeout = 3;
Returns | |
---|---|
Type | Description |
Duration |
The perTryTimeout. |
getPerTryTimeoutBuilder()
public Duration.Builder getPerTryTimeoutBuilder()
Specifies a non-zero timeout per retry attempt.
.google.protobuf.Duration per_try_timeout = 3;
Returns | |
---|---|
Type | Description |
Builder |
getPerTryTimeoutOrBuilder()
public DurationOrBuilder getPerTryTimeoutOrBuilder()
Specifies a non-zero timeout per retry attempt.
.google.protobuf.Duration per_try_timeout = 3;
Returns | |
---|---|
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: Proxy will attempt a retry if the destination service responds with any 5xx response code, of if the destination service does not respond at all, example: disconnect, reset, read timeout, connection failure and refused streams.
gateway-error: Similar to 5xx, but only applies to response codes 502, 503, 504.
reset: Proxy will attempt a retry if the destination service does not respond at all (disconnect/reset/read timeout)
connect-failure: Proxy will retry on failures connecting to destination for example due to connection timeouts.
retriable-4xx: Proxy will retry fro retriable 4xx response codes. Currently the only retriable error supported is 409.
refused-stream: Proxy will retry if the destination resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
repeated string retry_conditions = 1;
Parameter | |
---|---|
Name | Description |
index |
int The index of the element to return. |
Returns | |
---|---|
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: Proxy will attempt a retry if the destination service responds with any 5xx response code, of if the destination service does not respond at all, example: disconnect, reset, read timeout, connection failure and refused streams.
gateway-error: Similar to 5xx, but only applies to response codes 502, 503, 504.
reset: Proxy will attempt a retry if the destination service does not respond at all (disconnect/reset/read timeout)
connect-failure: Proxy will retry on failures connecting to destination for example due to connection timeouts.
retriable-4xx: Proxy will retry fro retriable 4xx response codes. Currently the only retriable error supported is 409.
refused-stream: Proxy will retry if the destination resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
repeated string retry_conditions = 1;
Parameter | |
---|---|
Name | Description |
index |
int The index of the value to return. |
Returns | |
---|---|
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: Proxy will attempt a retry if the destination service responds with any 5xx response code, of if the destination service does not respond at all, example: disconnect, reset, read timeout, connection failure and refused streams.
gateway-error: Similar to 5xx, but only applies to response codes 502, 503, 504.
reset: Proxy will attempt a retry if the destination service does not respond at all (disconnect/reset/read timeout)
connect-failure: Proxy will retry on failures connecting to destination for example due to connection timeouts.
retriable-4xx: Proxy will retry fro retriable 4xx response codes. Currently the only retriable error supported is 409.
refused-stream: Proxy will retry if the destination resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
repeated string retry_conditions = 1;
Returns | |
---|---|
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: Proxy will attempt a retry if the destination service responds with any 5xx response code, of if the destination service does not respond at all, example: disconnect, reset, read timeout, connection failure and refused streams.
gateway-error: Similar to 5xx, but only applies to response codes 502, 503, 504.
reset: Proxy will attempt a retry if the destination service does not respond at all (disconnect/reset/read timeout)
connect-failure: Proxy will retry on failures connecting to destination for example due to connection timeouts.
retriable-4xx: Proxy will retry fro retriable 4xx response codes. Currently the only retriable error supported is 409.
refused-stream: Proxy will retry if the destination resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
repeated string retry_conditions = 1;
Returns | |
---|---|
Type | Description |
ProtocolStringList |
A list containing the retryConditions. |
hasPerTryTimeout()
public boolean hasPerTryTimeout()
Specifies a non-zero timeout per retry attempt.
.google.protobuf.Duration per_try_timeout = 3;
Returns | |
---|---|
Type | Description |
boolean |
Whether the perTryTimeout field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
mergeFrom(HttpRoute.RetryPolicy other)
public HttpRoute.RetryPolicy.Builder mergeFrom(HttpRoute.RetryPolicy other)
Parameter | |
---|---|
Name | Description |
other |
HttpRoute.RetryPolicy |
Returns | |
---|---|
Type | Description |
HttpRoute.RetryPolicy.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public HttpRoute.RetryPolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
HttpRoute.RetryPolicy.Builder |
Exceptions | |
---|---|
Type | Description |
IOException |
mergeFrom(Message other)
public HttpRoute.RetryPolicy.Builder mergeFrom(Message other)
Parameter | |
---|---|
Name | Description |
other |
Message |
Returns | |
---|---|
Type | Description |
HttpRoute.RetryPolicy.Builder |
mergePerTryTimeout(Duration value)
public HttpRoute.RetryPolicy.Builder mergePerTryTimeout(Duration value)
Specifies a non-zero timeout per retry attempt.
.google.protobuf.Duration per_try_timeout = 3;
Parameter | |
---|---|
Name | Description |
value |
Duration |
Returns | |
---|---|
Type | Description |
HttpRoute.RetryPolicy.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final HttpRoute.RetryPolicy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
HttpRoute.RetryPolicy.Builder |
setField(Descriptors.FieldDescriptor field, Object value)
public HttpRoute.RetryPolicy.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
value |
Object |
Returns | |
---|---|
Type | Description |
HttpRoute.RetryPolicy.Builder |
setNumRetries(int value)
public HttpRoute.RetryPolicy.Builder setNumRetries(int value)
Specifies the allowed number of retries. This number must be > 0. If not specified, default to 1.
int32 num_retries = 2;
Parameter | |
---|---|
Name | Description |
value |
int The numRetries to set. |
Returns | |
---|---|
Type | Description |
HttpRoute.RetryPolicy.Builder |
This builder for chaining. |
setPerTryTimeout(Duration value)
public HttpRoute.RetryPolicy.Builder setPerTryTimeout(Duration value)
Specifies a non-zero timeout per retry attempt.
.google.protobuf.Duration per_try_timeout = 3;
Parameter | |
---|---|
Name | Description |
value |
Duration |
Returns | |
---|---|
Type | Description |
HttpRoute.RetryPolicy.Builder |
setPerTryTimeout(Duration.Builder builderForValue)
public HttpRoute.RetryPolicy.Builder setPerTryTimeout(Duration.Builder builderForValue)
Specifies a non-zero timeout per retry attempt.
.google.protobuf.Duration per_try_timeout = 3;
Parameter | |
---|---|
Name | Description |
builderForValue |
Builder |
Returns | |
---|---|
Type | Description |
HttpRoute.RetryPolicy.Builder |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public HttpRoute.RetryPolicy.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
index |
int |
value |
Object |
Returns | |
---|---|
Type | Description |
HttpRoute.RetryPolicy.Builder |
setRetryConditions(int index, String value)
public HttpRoute.RetryPolicy.Builder setRetryConditions(int index, String value)
Specifies one or more conditions when this retry policy applies. Valid values are: 5xx: Proxy will attempt a retry if the destination service responds with any 5xx response code, of if the destination service does not respond at all, example: disconnect, reset, read timeout, connection failure and refused streams.
gateway-error: Similar to 5xx, but only applies to response codes 502, 503, 504.
reset: Proxy will attempt a retry if the destination service does not respond at all (disconnect/reset/read timeout)
connect-failure: Proxy will retry on failures connecting to destination for example due to connection timeouts.
retriable-4xx: Proxy will retry fro retriable 4xx response codes. Currently the only retriable error supported is 409.
refused-stream: Proxy will retry if the destination resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
repeated string retry_conditions = 1;
Parameters | |
---|---|
Name | Description |
index |
int The index to set the value at. |
value |
String The retryConditions to set. |
Returns | |
---|---|
Type | Description |
HttpRoute.RetryPolicy.Builder |
This builder for chaining. |
setUnknownFields(UnknownFieldSet unknownFields)
public final HttpRoute.RetryPolicy.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
HttpRoute.RetryPolicy.Builder |