servicetalk-client-api/src/main/java/io/servicetalk/client/api/AbstractRetryingFilterBuilder.java
/**
         * Builds a new retry strategy {@link BiIntFunction} for retrying with
         * {@link Publisher#retryWhen(BiIntFunction)}, {@link Single#retryWhen(BiIntFunction)}, and
         * {@link Completable#retryWhen(BiIntFunction)} or in general with an alternative timer {@link Executor}.
         *
         * @param alternativeTimerExecutor {@link Executor} to be used to schedule timers for backoff if no executor
         * was provided at the build time
         * @return a new retry strategy {@link BiIntFunction}
         */
Builds a new retry strategy  BiIntFunction for retrying with
Publisher#retryWhen(BiIntFunction),  Single#retryWhen(BiIntFunction), and
Completable#retryWhen(BiIntFunction) or in general with an alternative timer  Executor.

@param alternativeTimerExecutor  Executor to be used to schedule timers for backoff if no executor
was provided at the build time
@return a new retry strategy  BiIntFunction
Builds a new retry strategy BiIntFunction for retrying with Publisher#retryWhen ( BiIntFunction ) Single#retryWhen ( BiIntFunction ) and Completable#retryWhen ( BiIntFunction ) or in general with an alternative timer Executor . @param alternativeTimerExecutor Executor to be used to schedule timers for backoff if no executor was provided at the build time @return a new retry strategy BiIntFunction
public BiIntFunction<Throwable, Completable> newStrategy(final Executor alternativeTimerExecutor) {
            if (initialDelay == null) {
                return (count, throwable) -> count <= maxRetries ? completed() : failed(throwable);
            } else {
                final Executor effectiveExecutor = timerExecutor == null ?
                        requireNonNull(alternativeTimerExecutor) : timerExecutor;
                if (exponential) {
                    assert maxDelay != null;
                    return jitter == FULL_JITTER ?
                            retryWithExponentialBackoffFullJitter(
                                    maxRetries, t -> true, initialDelay, maxDelay, effectiveExecutor) :
                            retryWithExponentialBackoffDeltaJitter(
                                    maxRetries, t -> true, initialDelay, jitter, maxDelay, effectiveExecutor);
                } else {
                    return jitter == FULL_JITTER ?
                            retryWithConstantBackoffFullJitter(
                                    maxRetries, t -> true, initialDelay, effectiveExecutor) :
                            retryWithConstantBackoffDeltaJitter(
                                    maxRetries, t -> true, initialDelay, jitter, effectiveExecutor);
                }
            }
        }
public BiIntFunction < Throwable , Completable > newStrategy ( final Executor alternativeTimerExecutor ) { if ( initialDelay == null ) { return ( count , throwable ) -> count <= maxRetries ? completed ( ) : failed ( throwable ) ; } else { final Executor effectiveExecutor = timerExecutor == null ? requireNonNull ( alternativeTimerExecutor ) : timerExecutor ; if ( exponential ) { assert maxDelay != null ; return jitter == FULL_JITTER ? retryWithExponentialBackoffFullJitter ( maxRetries , t -> true , initialDelay , maxDelay , effectiveExecutor ) : retryWithExponentialBackoffDeltaJitter ( maxRetries , t -> true , initialDelay , jitter , maxDelay , effectiveExecutor ) ; } else { return jitter == FULL_JITTER ? retryWithConstantBackoffFullJitter ( maxRetries , t -> true , initialDelay , effectiveExecutor ) : retryWithConstantBackoffDeltaJitter ( maxRetries , t -> true , initialDelay , jitter , effectiveExecutor ) ; } } }
Builds a new retry strategy {@link BiIntFunction} for retrying with
 {@link Publisher#retryWhen(BiIntFunction)}, {@link Single#retryWhen(BiIntFunction)}, and
 {@link Completable#retryWhen(BiIntFunction)} or in general with an alternative timer {@link Executor}.
Builds a new retry strategy { @link BiIntFunction } for retrying with { @link Publisher#retryWhen ( BiIntFunction ) } { @link Single#retryWhen ( BiIntFunction ) } and { @link Completable#retryWhen ( BiIntFunction ) } or in general with an alternative timer { @link Executor } .