Class RetryConfiguration.Builder

java.lang.Object
com.sinch.sdk.models.RetryConfiguration.Builder
Enclosing class:
RetryConfiguration

public static class RetryConfiguration.Builder extends Object
Dedicated Builder
Since:
2.2
  • Method Details

    • setRetryPolicy

      public RetryConfiguration.Builder setRetryPolicy(RetryPolicy retryPolicy)
      Set the strategy used to compute the delay before a retry
      Parameters:
      retryPolicy - Retry policy, or null to keep the default
      Returns:
      Current builder
      Since:
      2.2
      See Also:
    • setMaxRetryCount

      public RetryConfiguration.Builder setMaxRetryCount(int maxRetryCount)
      Set the maximum number of retries performed on top of the initial attempt
      Parameters:
      maxRetryCount - Maximum retry count, zero or greater
      Returns:
      Current builder
      Since:
      2.2
      See Also:
    • setExponentialBackoff

      public RetryConfiguration.Builder setExponentialBackoff(int exponentialBackoff)
      Set the growth factor of the exponential backoff
      Parameters:
      exponentialBackoff - Growth factor, one or greater
      Returns:
      Current builder
      Since:
      2.2
      See Also:
    • build

      public RetryConfiguration build()
      Build a RetryConfiguration instance from builder current state
      Returns:
      RetryConfiguration instance built from current builder state
      Since:
      2.2