Class RetryOrchestrator


  • @Internal
    public class RetryOrchestrator
    extends Object
    The RetryOrchestrator 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 Detail

      • RetryOrchestrator

        public RetryOrchestrator()
    • 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 configured RetryStrategy.
        Parameters:
        ctx - the core context into which timer the request is submitted.
        request - the request in question.