Class RetryConfig

java.lang.Object
io.getstream.services.framework.RetryConfig

public class RetryConfig extends Object
Opt-in auto-retry policy. Disabled by default: the client performs exactly one attempt and surfaces errors unchanged. When enabled, only GET/HEAD requests failing with HTTP 429 or a transport error are retried, and never when the backend marked the error unrecoverable.
  • Field Details

    • DEFAULT_MAX_ATTEMPTS

      public static final int DEFAULT_MAX_ATTEMPTS
      See Also:
    • DEFAULT_MAX_BACKOFF

      public static final Duration DEFAULT_MAX_BACKOFF
  • Constructor Details

    • RetryConfig

      public RetryConfig()
  • Method Details

    • setEnabled

      public RetryConfig setEnabled(boolean enabled)
    • setMaxAttempts

      public RetryConfig setMaxAttempts(int n)
    • setMaxBackoff

      public RetryConfig setMaxBackoff(@NotNull Duration d)
    • isEnabled

      public boolean isEnabled()
    • getMaxAttempts

      public int getMaxAttempts()
    • getMaxBackoff

      @NotNull public Duration getMaxBackoff()