Package com.contentstack.sdk
Interface CustomBackoffStrategy
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface CustomBackoffStrategy
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longcalculateDelay(int attempt, int statusCode, IOException exception)Calculates delay before next retry.
-
-
-
Method Detail
-
calculateDelay
long calculateDelay(int attempt, int statusCode, IOException exception)Calculates delay before next retry.- Parameters:
attempt- current attempt number (0-based)statusCode- HTTP status code (or -1 for network errors)exception- the exception that occurred (may be null)- Returns:
- delay in milliseconds before next retry
-
-