Returns whether any configured delay function can be applied for an execution result.

@see #withDelay(DelayFunction)
@see #withDelayOn(DelayFunction, Class)
@see #withDelayWhen(DelayFunction, Object)
429389
public boolean canApplyDelayFn(R result, Throwable failure) {
    return (delayResult == null || delayResult.equals(result)) && (delayFailure == null || (failure != null
        && delayFailure.isAssignableFrom(failure.getClass())));
  }
704996
public T addDelayedEvaluator(@NonNull DelayedEvaluator delayed) {
        if (mDelayed == null) {
            mDelayed = new ArrayList<>(4);
        }
        mDelayed.add(delayed);
        return self();
    }
907594
public static Delay constant(Duration delay) {

        LettuceAssert.notNull(delay, "Delay must not be null");
        LettuceAssert.isTrue(delay.toNanos() >= 0, "Delay must be greater or equal to 0");

        return new ConstantDelay(delay);
    }
862305
@Override
    public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) {
        synchronized (this.futures) {
            if (this.shutdown) throw new RejectedExecutionException();
            ScheduledFuture<?> future = this.executor.scheduleWithFixedDelay(command, initialDelay, delay, unit);
            this.futures.add(future);
            return future;
        }
    }
977564
function shouldInvoke(time) {
    let timeSinceLastCall = time - lastCallTime;

    let timeSinceLastInvoke = time - lastInvokeTime;
    // 几种满足条件的情况
    return (lastCallTime === undefined ||
      (timeSinceLastCall >= wait) ||
      (timeSinceLastCall < 0) ||
      (maxing && timeSinceLastInvoke >= maxWait)); // 超过最大等待时间
  }
826202
@Override
    public ScheduledFuture<?> scheduleWithFixedDelay(Runnable task, Date startTime, long delay) {
        ScheduledExecutorService executor = getScheduledExecutor();
        long initialDelay = startTime.getTime() - System.currentTimeMillis();
        try {
            return executor.scheduleWithFixedDelay(errorHandlingTask(task, true), initialDelay, delay,
                    TimeUnit.MILLISECONDS);
        } catch (RejectedExecutionException ex) {
            throw new TaskRejectedException("Executor [" + executor + "] did not accept task: " + task, ex);
        }
    }
677417
public synchronized boolean tryDelegateResponseHandling(Response<ByteArray, Object> response) {
        if(responseHandlingCutoff) {
            return false;
        } else {
            responseQueue.offer(response);
            this.notifyAll();
            return true;
        }
    }
1182856
static boolean isJavaPropertyMethod(final String methodName) {
        return (methodName.length() > PROPERTY_METHOD_PREFIX_LEN
                && (methodName.startsWith("get") || methodName.startsWith(("set"))));
    }
1351258
@Deprecated
    protected Statement withPotentialTimeout(FrameworkMethod method,
            Object test, Statement next) {
        long timeout = getTimeout(method.getAnnotation(Test.class));
        if (timeout <= 0) {
            return next;
        }
        return FailOnTimeout.builder()
               .withTimeout(timeout, TimeUnit.MILLISECONDS)
               .build(next);
    }
877386
def execute_with_delay(task_function, *args, **kwargs):
    
    delay = kwargs.pop('delay', 0)
    if get_setting('TEST_DISABLE_ASYNC_DELAY'):
        # Delay disabled, run synchronously
        logger.debug('Running function "%s" synchronously because '\
                     'TEST_DISABLE_ASYNC_DELAY is True'
                     % task_function.__name__)
        return task_function(*args, **kwargs)

    db.connections.close_all()
    task_function.apply_async(args=args, kwargs=kwargs, countdown=delay)
1234899
function taskWithDelay( delay, task )
{
  var con = new wConsequence();
  con.give();
  con.timeOutThen( delay, task );
  return con;
}
1095093
@Override
  public void cancel(Serializable f) {
    if (f != null && f instanceof TimerTaskHandle) {
      TimerTaskHandle timerTaskHandle = (TimerTaskHandle) f;
      if (timerTaskHandle.future != null) {
        logger.debug("Cancelling timer with id [{}] and delay [{}]", timerTaskHandle.id, timerTaskHandle.future.getDelay(TimeUnit.MILLISECONDS));
        if (executor.remove((Runnable) timerTaskHandle.future)) {
          timerTaskHandle.future.cancel(false);
          returnTimerTaskHandle(timerTaskHandle);
        }
      }
    }
  }
55755
function (fn, delay) {
    var timer = null;
    if (!delay || delay < 16) {
      delay = 16;
    }

    return function () {
      var _this = this;
      var args = arguments;

      if (timer === null) {
        timer = setTimeout(function () {
          fn.apply(_this, args);
          timer = null;
        }, delay);
      }
    };
  }
674395
public boolean callProcedureWithClientTimeout(
            ProcedureCallback callback,
            int batchTimeout,
            String procName,
            long clientTimeout,
            TimeUnit clientTimeoutUnit,
            Object... parameters)
                    throws IOException, NoConnectionsException
    {
        return callProcedureWithClientTimeout(
                callback, batchTimeout, false, procName, clientTimeout, clientTimeoutUnit, parameters);
    }
699843
public static ScheduledFuture scheduleWithFixedDelay(Runnable runnable, long delayInMilli) {
        /* 我们默认设定一个runnable生命周期与一个msgId一一对应 */
        Runnable proxy = wrapRunnable(runnable, null);
        return newSingleThreadScheduler().scheduleWithFixedDelay(proxy, 0, delayInMilli, TimeUnit.MILLISECONDS);
    }
1584
public static boolean isMonitorWait(String methodName, String methodSig) {
        return "wait".equals(methodName) && ("()V".equals(methodSig) || "(J)V".equals(methodSig) || "(JI)V".equals(methodSig));
    }
117218
public Date getNextRunWithDelay(Date date) {
    Date result = addSeconds(date, Math.min((int)(Math.pow(2., (double)countEmptyRuns) * START_DELAY), MAX_DELAY));
    return result;
  }