Package com.couchbase.client.core.retry
Class RetryAction
- java.lang.Object
-
- com.couchbase.client.core.retry.RetryAction
-
public class RetryAction extends Object
TheRetryActiondescribes how and when a request should be retried.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<Duration>duration()If present, the operation should be retried after the given duration.static RetryActionnoRetry()Constructs a newRetryActionindicating that the request should not be retried.static RetryActionwithDuration(Duration duration)Constructs a newRetryActionindicating that the request should be retried after the given duration.
-
-
-
Method Detail
-
withDuration
public static RetryAction withDuration(Duration duration)
Constructs a newRetryActionindicating that the request should be retried after the given duration.- Parameters:
duration- the duration after which the request should be retried.- Returns:
- a new
RetryActionindicating retry.
-
noRetry
public static RetryAction noRetry()
Constructs a newRetryActionindicating that the request should not be retried.- Returns:
- a new
RetryActionindicating no retry.
-
-