Class GrpcRoute.RetryPolicy.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<GrpcRoute.RetryPolicy.Builder>
com.google.cloud.networkservices.v1.GrpcRoute.RetryPolicy.Builder
- All Implemented Interfaces:
GrpcRoute.RetryPolicyOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- GrpcRoute.RetryPolicy
public static final class GrpcRoute.RetryPolicy.Builder
extends com.google.protobuf.GeneratedMessage.Builder<GrpcRoute.RetryPolicy.Builder>
implements GrpcRoute.RetryPolicyOrBuilder
The specifications for retries. Specifies one or more conditions for which this retry rule applies. Valid values are:Protobuf type
google.cloud.networkservices.v1.GrpcRoute.RetryPolicy-
Method Summary
Modifier and TypeMethodDescriptionaddAllRetryConditions(Iterable<String> values) - connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeoutsaddRetryConditions(String value) - connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeoutsaddRetryConditionsBytes(com.google.protobuf.ByteString value) - connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeoutsbuild()clear()Specifies the allowed number of retries.- connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeoutsstatic final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorintSpecifies the allowed number of retries.getRetryConditions(int index) - connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeoutscom.google.protobuf.ByteStringgetRetryConditionsBytes(int index) - connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeoutsint- connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeoutscom.google.protobuf.ProtocolStringList- connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeoutsprotected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(GrpcRoute.RetryPolicy other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setNumRetries(int value) Specifies the allowed number of retries.setRetryConditions(int index, String value) - connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeoutsMethods 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<GrpcRoute.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<GrpcRoute.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<GrpcRoute.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<GrpcRoute.RetryPolicy.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<GrpcRoute.RetryPolicy.Builder>
-
mergeFrom
public GrpcRoute.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<GrpcRoute.RetryPolicy.Builder>- Throws:
IOException
-
getRetryConditionsList
public com.google.protobuf.ProtocolStringList getRetryConditionsList()- connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts. - refused-stream: Router will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. - cancelled: Router will retry if the gRPC status code in the response header is set to cancelled - deadline-exceeded: Router will retry if the gRPC status code in the response header is set to deadline-exceeded - resource-exhausted: Router will retry if the gRPC status code in the response header is set to resource-exhausted - unavailable: Router will retry if the gRPC status code in the response header is set to unavailable
repeated string retry_conditions = 1;- Specified by:
getRetryConditionsListin interfaceGrpcRoute.RetryPolicyOrBuilder- Returns:
- A list containing the retryConditions.
-
getRetryConditionsCount
public int getRetryConditionsCount()- connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts. - refused-stream: Router will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. - cancelled: Router will retry if the gRPC status code in the response header is set to cancelled - deadline-exceeded: Router will retry if the gRPC status code in the response header is set to deadline-exceeded - resource-exhausted: Router will retry if the gRPC status code in the response header is set to resource-exhausted - unavailable: Router will retry if the gRPC status code in the response header is set to unavailable
repeated string retry_conditions = 1;- Specified by:
getRetryConditionsCountin interfaceGrpcRoute.RetryPolicyOrBuilder- Returns:
- The count of retryConditions.
-
getRetryConditions
- connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts. - refused-stream: Router will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. - cancelled: Router will retry if the gRPC status code in the response header is set to cancelled - deadline-exceeded: Router will retry if the gRPC status code in the response header is set to deadline-exceeded - resource-exhausted: Router will retry if the gRPC status code in the response header is set to resource-exhausted - unavailable: Router will retry if the gRPC status code in the response header is set to unavailable
repeated string retry_conditions = 1;- Specified by:
getRetryConditionsin interfaceGrpcRoute.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) - connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts. - refused-stream: Router will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. - cancelled: Router will retry if the gRPC status code in the response header is set to cancelled - deadline-exceeded: Router will retry if the gRPC status code in the response header is set to deadline-exceeded - resource-exhausted: Router will retry if the gRPC status code in the response header is set to resource-exhausted - unavailable: Router will retry if the gRPC status code in the response header is set to unavailable
repeated string retry_conditions = 1;- Specified by:
getRetryConditionsBytesin interfaceGrpcRoute.RetryPolicyOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the retryConditions at the given index.
-
setRetryConditions
- connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts. - refused-stream: Router will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. - cancelled: Router will retry if the gRPC status code in the response header is set to cancelled - deadline-exceeded: Router will retry if the gRPC status code in the response header is set to deadline-exceeded - resource-exhausted: Router will retry if the gRPC status code in the response header is set to resource-exhausted - unavailable: Router will retry if the gRPC status code in the response header is set to unavailable
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
- connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts. - refused-stream: Router will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. - cancelled: Router will retry if the gRPC status code in the response header is set to cancelled - deadline-exceeded: Router will retry if the gRPC status code in the response header is set to deadline-exceeded - resource-exhausted: Router will retry if the gRPC status code in the response header is set to resource-exhausted - unavailable: Router will retry if the gRPC status code in the response header is set to unavailable
repeated string retry_conditions = 1;- Parameters:
value- The retryConditions to add.- Returns:
- This builder for chaining.
-
addAllRetryConditions
- connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts. - refused-stream: Router will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. - cancelled: Router will retry if the gRPC status code in the response header is set to cancelled - deadline-exceeded: Router will retry if the gRPC status code in the response header is set to deadline-exceeded - resource-exhausted: Router will retry if the gRPC status code in the response header is set to resource-exhausted - unavailable: Router will retry if the gRPC status code in the response header is set to unavailable
repeated string retry_conditions = 1;- Parameters:
values- The retryConditions to add.- Returns:
- This builder for chaining.
-
clearRetryConditions
- connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts. - refused-stream: Router will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. - cancelled: Router will retry if the gRPC status code in the response header is set to cancelled - deadline-exceeded: Router will retry if the gRPC status code in the response header is set to deadline-exceeded - resource-exhausted: Router will retry if the gRPC status code in the response header is set to resource-exhausted - unavailable: Router will retry if the gRPC status code in the response header is set to unavailable
repeated string retry_conditions = 1;- Returns:
- This builder for chaining.
-
addRetryConditionsBytes
- connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts. - refused-stream: Router will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. - cancelled: Router will retry if the gRPC status code in the response header is set to cancelled - deadline-exceeded: Router will retry if the gRPC status code in the response header is set to deadline-exceeded - resource-exhausted: Router will retry if the gRPC status code in the response header is set to resource-exhausted - unavailable: Router will retry if the gRPC status code in the response header is set to unavailable
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.
uint32 num_retries = 2;- Specified by:
getNumRetriesin interfaceGrpcRoute.RetryPolicyOrBuilder- Returns:
- The numRetries.
-
setNumRetries
Specifies the allowed number of retries. This number must be > 0. If not specified, default to 1.
uint32 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.
uint32 num_retries = 2;- Returns:
- This builder for chaining.
-