Class BackOffUtils
java.lang.Object
com.thanlinardos.spring_enterprise_library.math.utils.BackOffUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic longgetExponentialBackoffDelay(int retryCount, int backOffStepSize, int maxDelay) Exponential backoff delay calculation.
-
Constructor Details
-
BackOffUtils
public BackOffUtils()
-
-
Method Details
-
getExponentialBackoffDelay
public static long getExponentialBackoffDelay(int retryCount, int backOffStepSize, int maxDelay) Exponential backoff delay calculation.- Parameters:
retryCount- the current retry attempt (0-based).backOffStepSize- the base delay in seconds.maxDelay- the maximum delay in seconds.- Returns:
- the calculated delay in seconds.
-