io.milvus.param

## Class RetryParam.Builder

- java.lang.Object
- - io.milvus.param.RetryParam.Builder

- Enclosing class:
    RetryParam

      public static class RetryParam.Builder
      extends java.lang.Object

  Builder for `ConnectParam`

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `RetryParam` | `build()` Verifies parameters and creates a new `RetryParam` instance.
    `RetryParam.Builder` | `withBackOffMultiplier(int backOffMultiplier)` Sets multiplier to increase time interval after each retry.
    `RetryParam.Builder` | `withInitialBackOffMs(long initialBackOffMs)` Sets the first time interval between two retries, units: millisecond.
    `RetryParam.Builder` | `withMaxBackOffMs(long maxBackOffMs)` Sets the maximum time interval between two retries, units: millisecond.
    `RetryParam.Builder` | `withMaxRetryTimes(int maxRetryTimes)` Sets the max retry times on failure.Default value is 75.
    `RetryParam.Builder` | `withRetryOnRateLimit(boolean retryOnRateLimit)` Sets whether to retry when the returned error is rate limit.Default value is true.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### withMaxRetryTimes

          public RetryParam.Builder withMaxRetryTimes(int maxRetryTimes)

      Sets the max retry times on failure.Default value is 75.
      Parameters:
        `maxRetryTimes` - the maxinum times to retry
      Returns:
        `Builder`

    - #### withInitialBackOffMs

          public RetryParam.Builder withInitialBackOffMs(long initialBackOffMs)

      Sets the first time interval between two retries, units: millisecond. Default value is 10ms.
      Parameters:
        `initialBackOffMs` - time interval value
      Returns:
        `Builder`

    - #### withMaxBackOffMs

          public RetryParam.Builder withMaxBackOffMs(long maxBackOffMs)

      Sets the maximum time interval between two retries, units: millisecond. Default value is 3000ms.
      Parameters:
        `maxBackOffMs` - time interval value
      Returns:
        `Builder`

    - #### withBackOffMultiplier

          public RetryParam.Builder withBackOffMultiplier(int backOffMultiplier)

      Sets multiplier to increase time interval after each retry. Default value is 3.
      Parameters:
        `backOffMultiplier` - the multiplier to increase time interval after each retry
      Returns:
        `Builder`

    - #### withRetryOnRateLimit

          public RetryParam.Builder withRetryOnRateLimit(boolean retryOnRateLimit)

      Sets whether to retry when the returned error is rate limit.Default value is true.
      Parameters:
        `retryOnRateLimit` - whether to retry when the returned error is rate limit
      Returns:
        `Builder`

    - #### build

          public RetryParam build()
                           throws ParamException

      Verifies parameters and creates a new `RetryParam` instance.
      Returns:
        `RetryParam`
      Throws:
        `ParamException`