Package com.cloudera.cdp.http
Interface RetryChecker
-
- All Known Implementing Classes:
HttpCodesRetryChecker
public interface RetryChecker
A RetryChecker decides, given the number of attempts and the exception form the most recent request, whether the caller should retry or not.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
shouldRetry(int attempts, CdpClientException exception)
Returns 'true' if the call should be retried, 'false' otherwise.
-
-
-
Method Detail
-
shouldRetry
boolean shouldRetry(int attempts, CdpClientException exception)
Returns 'true' if the call should be retried, 'false' otherwise.- Parameters:
attempts
- The number of attempts madeexception
- the request exception- Returns:
- 'true' if the caller should retry, 'false' otherwise
-
-