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
Modifier and TypeMethodDescriptionboolean
shouldRetry
(int attempts, CdpClientException exception) Returns 'true' if the call should be retried, 'false' otherwise.
-
Method Details
-
shouldRetry
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
-