Package com.couchbase.client.core.retry
Class RetryOrchestrator
- java.lang.Object
-
- com.couchbase.client.core.retry.RetryOrchestrator
-
@Internal public class RetryOrchestrator extends Object
TheRetryOrchestrator
is responsible for checking if a request is eligible for retry and if so dispatch it properly and update state.This class has been around since the 1.0 days, but has been adapted to fit the new model where each request can have its own retry strategy.
- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor Description RetryOrchestrator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
maybeRetry(CoreContext ctx, Request<? extends Response> request)
Retry or cancel the given request, depending on its state and the configuredRetryStrategy
.static void
retryImmediately(CoreContext ctx, Request<? extends Response> request)
Retries the given request immediatly, unless it is already completed.
-
-
-
Method Detail
-
retryImmediately
public static void retryImmediately(CoreContext ctx, Request<? extends Response> request)
Retries the given request immediatly, unless it is already completed.This method is usually used in contexts like "not my vbucket" where we need to retry completely transparently and not based on the retry strategy configured.
- Parameters:
ctx
- the core context into which timer the request is submitted.request
- the request in question.
-
maybeRetry
public static void maybeRetry(CoreContext ctx, Request<? extends Response> request)
Retry or cancel the given request, depending on its state and the configuredRetryStrategy
.- Parameters:
ctx
- the core context into which timer the request is submitted.request
- the request in question.
-
-