@Stability.Internal public class FailFastRetryStrategy extends Object implements RetryStrategy
This class is considered internal! For external purposes we recommend extending the BestEffortRetryStrategy
and only failing on certain RetryReason
as needed or based on a request context or external property. Using
this strategy here directly, if not used carefully, will lead to lot of copy/pasting of try/catch blocks and not
to clean code.
Modifier and Type | Field and Description |
---|---|
static FailFastRetryStrategy |
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() |
public static final FailFastRetryStrategy INSTANCE
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.