code: private void scheduleForRetry(final CouchbaseRequest request, final boolean isNotMyVbucket) {
          CoreEnvironment env = environment;
          long delayTime;
          TimeUnit delayUnit;
  
          if (request.retryDelay() != null) {
              Delay delay = request.retryDelay();
              if (request.retryCount() == 0) {
                  delayTime = request.retryAfter();
                  request.incrementRetryCount();
              } else {
                  delayTime = delay.calculate(request.incrementRetryCount());
              }
              delayUnit = delay.unit();
              if (request.maxRetryDuration() != 0 && ((System.currentTimeMillis()) + delayTime) > request.maxRetryDuration()) {
                  request.observable().onError(new RequestCancelledException("Could not dispatch request, cancelling "
                          + "instead of retrying as the maximum retry duration specified by Server has been exceeded"));
                  return;
              }
          } else {
              Delay delay = env.retryDelay();
              if (isNotMyVbucket) {
                  boolean hasFastForward = bucketHasFastForwardMap(request.bucket(), configurationProvider.config());
                  delayTime = request.incrementRetryCount() == 0 && hasFastForward ? 0 : nmvbRetryDelay;
                  delayUnit = TimeUnit.MILLISECONDS;
              } else {
                  delayTime = delay.calculate(request.incrementRetryCount());
                  delayUnit = delay.unit();
              }
          }
  
          if (traceLoggingEnabled) {
              LOGGER.trace("Retrying {} with a delay of {} {}", request, delayTime, delayUnit);
          }
  
          final Scheduler.Worker worker = env.scheduler().createWorker();
          worker.schedule(new Action0() {
              @Override
              public void call() {
                  try {
                      cluster.send(request);
                  } finally {
                      worker.unsubscribe();
                  }
              }
          }, delayTime, delayUnit);
      }
docs: Helper method which schedules the given {@link CouchbaseRequest} with a delay for further retry.
  
  @param request the request to retry.