Package com.flagsmith.config
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 Summary
-
Method Summary
Modifier and Type Method Description LongcalculateSleepTime()The sleep time based on back off factor.BooleanisRetry(Integer statusCode)Should Retry or not?.voidretryAttempted()voidwaitWithBackoff()
-
Constructor Details
-
Retry
-
-
Method Details
-
isRetry
Should Retry or not?.- Parameters:
statusCode- status code of last call
-
calculateSleepTime
The sleep time based on back off factor. -
waitWithBackoff
- Throws:
InterruptedException
-
retryAttempted
public void retryAttempted()
-