Class RetryUtil.RetryOptions

java.lang.Object
com.cercalia.sdk.util.RetryUtil.RetryOptions
Enclosing class:
RetryUtil

public static class RetryUtil.RetryOptions extends Object
Options for retry behavior.
  • Constructor Details

    • RetryOptions

      public RetryOptions()
  • Method Details

    • maxAttempts

      public RetryUtil.RetryOptions maxAttempts(int maxAttempts)
      Parameters:
      maxAttempts - maximum number of attempts.
      Returns:
      this options instance.
    • delayMs

      public RetryUtil.RetryOptions delayMs(long delayMs)
      Parameters:
      delayMs - delay between retries in milliseconds.
      Returns:
      this options instance.
    • logRetries

      public RetryUtil.RetryOptions logRetries(boolean logRetries)
      Parameters:
      logRetries - whether to log retry attempts.
      Returns:
      this options instance.
    • operationName

      public RetryUtil.RetryOptions operationName(String operationName)
      Parameters:
      operationName - name of the operation for logging.
      Returns:
      this options instance.
    • getMaxAttempts

      public int getMaxAttempts()
      Returns:
      maximum number of attempts.
    • getDelayMs

      public long getDelayMs()
      Returns:
      delay between retries in milliseconds.
    • isLogRetries

      public boolean isLogRetries()
      Returns:
      whether to log retry attempts.
    • getOperationName

      public String getOperationName()
      Returns:
      name of the operation for logging.