Class Retry

java.lang.Object
com.flagsmith.config.Retry

public class Retry
extends Object
An implementation in Java for the Retry component of the Python urllib3 library. https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html#urllib3.util.Retry
  • Constructor Details

    • Retry

      public Retry​(Integer total)
  • Method Details

    • isRetry

      public Boolean isRetry​(Integer statusCode)
      Should Retry or not?.
      Parameters:
      statusCode - status code of last call
    • calculateSleepTime

      public Long calculateSleepTime()
      The sleep time based on back off factor.
    • waitWithBackoff

      public void waitWithBackoff() throws InterruptedException
      Throws:
      InterruptedException
    • retryAttempted

      public void retryAttempted()