Package com.cloudera.cdp.http
Class NeverRetryHandler
- java.lang.Object
-
- com.cloudera.cdp.http.NeverRetryHandler
-
- All Implemented Interfaces:
RetryHandler
public class NeverRetryHandler extends Object implements RetryHandler
A retry handler that will never retry.
-
-
Field Summary
-
Fields inherited from interface com.cloudera.cdp.http.RetryHandler
DO_NOT_RETRY
-
-
Constructor Summary
Constructors Constructor Description NeverRetryHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Duration
shouldRetry(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.
-
-
-
Method Detail
-
shouldRetry
public Duration shouldRetry(int attempts, CdpClientException exception)
Description copied from interface:RetryHandler
Returns the duration the caller need to wait before retrying or null if no retry should be attempted according to the retry policy.- Specified by:
shouldRetry
in interfaceRetryHandler
- 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
-
-