Package com.cloudera.cdp.http
Interface RetryHandler
- All Known Implementing Classes:
NeverRetryHandler
,SimpleRetryHandler
public interface RetryHandler
An interface for handling retries.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionshouldRetry
(int attempts, CdpClientException exception) Returns the duration the caller need to wait before retrying or null if no retry should be attempted according to the retry policy.
-
Field Details
-
DO_NOT_RETRY
-
-
Method Details
-
shouldRetry
Returns the duration the caller need to wait before retrying or null if no retry should be attempted according to the retry policy.- Parameters:
attempts
- the number of attempts so farexception
- the request exception- Returns:
- the duration to wait for the next attempt or null if no retry should be attempted
-