java.lang.Object
io.avaje.http.client.SimpleRetryHandler
- All Implemented Interfaces:
RetryHandler
public class SimpleRetryHandler extends Object implements RetryHandler
Simple retry with max attempts and linear backoff.
-
Constructor Summary
Constructors Constructor Description SimpleRetryHandler(int maxRetries, long backoffMillis)
-
Method Summary
Modifier and Type Method Description boolean
isRetry(int retryCount, HttpResponse<?> response)
Return true if the request should be retried.
-
Constructor Details
-
SimpleRetryHandler
public SimpleRetryHandler(int maxRetries, long backoffMillis)
-
-
Method Details
-
isRetry
Description copied from interface:RetryHandler
Return true if the request should be retried.- Specified by:
isRetry
in interfaceRetryHandler
- Parameters:
retryCount
- The number of retry attempts already executedresponse
- The HTTP response- Returns:
- True if the request should be retried or false if not
-