- 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)Create with maximum number of retries and linear backoff time.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisRetry(int retryCount, HttpResponse<?> response)Return true if the request should be retried.
-
-
-
Method Detail
-
isRetry
public boolean isRetry(int retryCount, HttpResponse<?> response)Description copied from interface:RetryHandlerReturn true if the request should be retried.- Specified by:
isRetryin 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
-
-