public class BestEffortRetryStrategy extends Object implements RetryStrategy
Modifier and Type | Field and Description |
---|---|
static BestEffortRetryStrategy |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
CompletableFuture<RetryAction> |
shouldRetry(Request<? extends Response> request,
RetryReason reason)
Checks if the given request should be retried and how long the
retry delay should be.
|
String |
toString() |
static BestEffortRetryStrategy |
withExponentialBackoff(Duration lower,
Duration upper,
int factor) |
public static final BestEffortRetryStrategy INSTANCE
public static BestEffortRetryStrategy withExponentialBackoff(Duration lower, Duration upper, int factor)
public CompletableFuture<RetryAction> shouldRetry(Request<? extends Response> request, RetryReason reason)
RetryStrategy
shouldRetry
in interface RetryStrategy
request
- the request to be checked.Copyright © 2020 Couchbase, Inc.. All rights reserved.