Package com.couchbase.client.core.retry
Class RetryAction
java.lang.Object
com.couchbase.client.core.retry.RetryAction
public class RetryAction extends Object
The
RetryAction
describes how and when a request should be retried.-
Method Summary
Modifier and Type Method Description Optional<Duration>
duration()
If present, the operation should be retried after the given duration.static RetryAction
noRetry()
Constructs a newRetryAction
indicating that the request should not be retried.static RetryAction
withDuration(Duration duration)
Constructs a newRetryAction
indicating that the request should be retried after the given duration.
-
Method Details
-
withDuration
Constructs a newRetryAction
indicating that the request should be retried after the given duration.- Parameters:
duration
- the duration after which the request should be retried.- Returns:
- a new
RetryAction
indicating retry.
-
noRetry
Constructs a newRetryAction
indicating that the request should not be retried.- Returns:
- a new
RetryAction
indicating no retry.
-
duration
If present, the operation should be retried after the given duration.- Returns:
- the duration indicating if (and when) the request should be retried.
-