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 Type
    Method
    Description
    - connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts
    - connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts
    addRetryConditionsBytes(com.google.protobuf.ByteString value)
    - connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts
     
     
     
    Specifies the allowed number of retries.
    - connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    int
    Specifies the allowed number of retries.
    getRetryConditions(int index)
    - connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts
    com.google.protobuf.ByteString
    - connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts
    int
    - connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts
    com.google.protobuf.ProtocolStringList
    - connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    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 timeouts

    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, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods 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:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<GrpcRoute.RetryPolicy.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<GrpcRoute.RetryPolicy.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<GrpcRoute.RetryPolicy.Builder>
    • getDefaultInstanceForType

      public GrpcRoute.RetryPolicy getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public GrpcRoute.RetryPolicy build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public GrpcRoute.RetryPolicy buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public GrpcRoute.RetryPolicy.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<GrpcRoute.RetryPolicy.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.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:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.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:
      getRetryConditionsList in interface GrpcRoute.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:
      getRetryConditionsCount in interface GrpcRoute.RetryPolicyOrBuilder
      Returns:
      The count of retryConditions.
    • getRetryConditions

      public String getRetryConditions(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:
      getRetryConditions in interface GrpcRoute.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:
      getRetryConditionsBytes in interface GrpcRoute.RetryPolicyOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the retryConditions at the given index.
    • setRetryConditions

      public GrpcRoute.RetryPolicy.Builder setRetryConditions(int index, String value)
       - 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

      public GrpcRoute.RetryPolicy.Builder addRetryConditions(String value)
       - 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

      public GrpcRoute.RetryPolicy.Builder addAllRetryConditions(Iterable<String> values)
       - 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

      public GrpcRoute.RetryPolicy.Builder 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

      public GrpcRoute.RetryPolicy.Builder addRetryConditionsBytes(com.google.protobuf.ByteString value)
       - 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:
      getNumRetries in interface GrpcRoute.RetryPolicyOrBuilder
      Returns:
      The numRetries.
    • setNumRetries

      public GrpcRoute.RetryPolicy.Builder setNumRetries(int value)
       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

      public GrpcRoute.RetryPolicy.Builder 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.