Class RetryHelper

java.lang.Object
com.couchbase.client.core.retry.RetryHelper

public class RetryHelper
extends Object
A helper class which contains methods related to retrying operations.
Since:
1.1.0
Author:
Michael Nitschinger
  • Constructor Details

    • RetryHelper

      public RetryHelper()
  • Method Details

    • retryOrCancel

      public static void retryOrCancel​(CoreEnvironment environment, CouchbaseRequest request, com.lmax.disruptor.EventSink<ResponseEvent> responseBuffer)
      Either retry or cancel a request, based on the strategy used.
      Parameters:
      environment - the core environment for context.
      request - the request to either retry or cancel.
      responseBuffer - the response buffer where to maybe retry on.
    • retry

      public static void retry​(CouchbaseRequest request, com.lmax.disruptor.EventSink<ResponseEvent> responseBuffer)
      Always retry the request and send it into the response buffer.
      Parameters:
      request - the request to retry
      responseBuffer - the response buffer to send it into.