Class HttpRoute.RetryPolicy.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<HttpRoute.RetryPolicy.Builder>
com.google.cloud.networkservices.v1.HttpRoute.RetryPolicy.Builder
- All Implemented Interfaces:
HttpRoute.RetryPolicyOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- HttpRoute.RetryPolicy
public static final class HttpRoute.RetryPolicy.Builder
extends com.google.protobuf.GeneratedMessage.Builder<HttpRoute.RetryPolicy.Builder>
implements HttpRoute.RetryPolicyOrBuilder
The specifications for retries.Protobuf type
google.cloud.networkservices.v1.HttpRoute.RetryPolicy-
Method Summary
Modifier and TypeMethodDescriptionaddAllRetryConditions(Iterable<String> values) Specifies one or more conditions when this retry policy applies.addRetryConditions(String value) Specifies one or more conditions when this retry policy applies.addRetryConditionsBytes(com.google.protobuf.ByteString value) Specifies one or more conditions when this retry policy applies.build()clear()Specifies the allowed number of retries.Specifies a non-zero timeout per retry attempt.Specifies one or more conditions when this retry policy applies.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorintSpecifies the allowed number of retries.com.google.protobuf.DurationSpecifies a non-zero timeout per retry attempt.com.google.protobuf.Duration.BuilderSpecifies a non-zero timeout per retry attempt.com.google.protobuf.DurationOrBuilderSpecifies a non-zero timeout per retry attempt.getRetryConditions(int index) Specifies one or more conditions when this retry policy applies.com.google.protobuf.ByteStringgetRetryConditionsBytes(int index) Specifies one or more conditions when this retry policy applies.intSpecifies one or more conditions when this retry policy applies.com.google.protobuf.ProtocolStringListSpecifies one or more conditions when this retry policy applies.booleanSpecifies a non-zero timeout per retry attempt.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(HttpRoute.RetryPolicy other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergePerTryTimeout(com.google.protobuf.Duration value) Specifies a non-zero timeout per retry attempt.setNumRetries(int value) Specifies the allowed number of retries.setPerTryTimeout(com.google.protobuf.Duration value) Specifies a non-zero timeout per retry attempt.setPerTryTimeout(com.google.protobuf.Duration.Builder builderForValue) Specifies a non-zero timeout per retry attempt.setRetryConditions(int index, String value) Specifies one or more conditions when this retry policy applies.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<HttpRoute.RetryPolicy.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<HttpRoute.RetryPolicy.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<HttpRoute.RetryPolicy.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<HttpRoute.RetryPolicy.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<HttpRoute.RetryPolicy.Builder>
-
mergeFrom
public HttpRoute.RetryPolicy.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<HttpRoute.RetryPolicy.Builder>- Throws:
IOException
-
getRetryConditionsList
public com.google.protobuf.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;- Specified by:
getRetryConditionsListin interfaceHttpRoute.RetryPolicyOrBuilder- Returns:
- A list containing the retryConditions.
-
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;- Specified by:
getRetryConditionsCountin interfaceHttpRoute.RetryPolicyOrBuilder- Returns:
- The count of retryConditions.
-
getRetryConditions
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;- Specified by:
getRetryConditionsin interfaceHttpRoute.RetryPolicyOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The retryConditions at the given index.
-
getRetryConditionsBytes
public com.google.protobuf.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;- Specified by:
getRetryConditionsBytesin interfaceHttpRoute.RetryPolicyOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the retryConditions at the given index.
-
setRetryConditions
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:
index- The index to set the value at.value- The retryConditions to set.- Returns:
- This builder for chaining.
-
addRetryConditions
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:
value- The retryConditions to add.- Returns:
- This builder for chaining.
-
addAllRetryConditions
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:
values- The retryConditions to add.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
addRetryConditionsBytes
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:
value- The bytes of the retryConditions to add.- Returns:
- This builder for chaining.
-
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;- Specified by:
getNumRetriesin interfaceHttpRoute.RetryPolicyOrBuilder- Returns:
- The numRetries.
-
setNumRetries
Specifies the allowed number of retries. This number must be > 0. If not specified, default to 1.
int32 num_retries = 2;- Parameters:
value- The numRetries to set.- Returns:
- This builder for chaining.
-
clearNumRetries
Specifies the allowed number of retries. This number must be > 0. If not specified, default to 1.
int32 num_retries = 2;- Returns:
- This builder for chaining.
-
hasPerTryTimeout
public boolean hasPerTryTimeout()Specifies a non-zero timeout per retry attempt.
.google.protobuf.Duration per_try_timeout = 3;- Specified by:
hasPerTryTimeoutin interfaceHttpRoute.RetryPolicyOrBuilder- Returns:
- Whether the perTryTimeout field is set.
-
getPerTryTimeout
public com.google.protobuf.Duration getPerTryTimeout()Specifies a non-zero timeout per retry attempt.
.google.protobuf.Duration per_try_timeout = 3;- Specified by:
getPerTryTimeoutin interfaceHttpRoute.RetryPolicyOrBuilder- Returns:
- The perTryTimeout.
-
setPerTryTimeout
Specifies a non-zero timeout per retry attempt.
.google.protobuf.Duration per_try_timeout = 3; -
setPerTryTimeout
public HttpRoute.RetryPolicy.Builder setPerTryTimeout(com.google.protobuf.Duration.Builder builderForValue) Specifies a non-zero timeout per retry attempt.
.google.protobuf.Duration per_try_timeout = 3; -
mergePerTryTimeout
Specifies a non-zero timeout per retry attempt.
.google.protobuf.Duration per_try_timeout = 3; -
clearPerTryTimeout
Specifies a non-zero timeout per retry attempt.
.google.protobuf.Duration per_try_timeout = 3; -
getPerTryTimeoutBuilder
public com.google.protobuf.Duration.Builder getPerTryTimeoutBuilder()Specifies a non-zero timeout per retry attempt.
.google.protobuf.Duration per_try_timeout = 3; -
getPerTryTimeoutOrBuilder
public com.google.protobuf.DurationOrBuilder getPerTryTimeoutOrBuilder()Specifies a non-zero timeout per retry attempt.
.google.protobuf.Duration per_try_timeout = 3;- Specified by:
getPerTryTimeoutOrBuilderin interfaceHttpRoute.RetryPolicyOrBuilder
-