/** * Attempt to sleep when the specified criteria is met. * * @param criteria {@code true} if this method should sleep, or {@code false} if there is no need to sleep * @return {@code true} if this invocation caused the thread to sleep, or {@code false} if this method did not sleep */ default boolean sleepWhen(BooleanSupplier criteria) { return sleepWhen(criteria.getAsBoolean()); }
primaryBackoffStrategy.sleepWhen(true); continue;
/** * Attempt to sleep when the specified criteria is met. * * @param criteria {@code true} if this method should sleep, or {@code false} if there is no need to sleep * @return {@code true} if this invocation caused the thread to sleep, or {@code false} if this method did not sleep */ default boolean sleepWhen(BooleanSupplier criteria) { return sleepWhen(criteria.getAsBoolean()); }