@Override default <R> IO<R> retry(Function<? super T, ? extends R> fn) { return (IO<R>)ReactiveTransformable.super.retry(fn); } default <R> IO<R> checkedRetry(CheckedFunction<? super T,? extends R> checkedFunction, int retries, long delay, TimeUnit timeUnit){
return map(retry);
return map(retry);
@Override default <R> IO<R> retry(Function<? super T, ? extends R> fn, int retries, long delay, TimeUnit timeUnit) { return (IO<R>)ReactiveTransformable.super.retry(fn,retries,delay,timeUnit); }
/** * Retry a transformation if it fails. Default settings are to retry up to 7 * times, with an doubling backoff period starting @ 2 seconds delay before * retry. * * * @param fn * Function to retry if fails * */ default <R> Transformable<R> retry(final Function<? super T, ? extends R> fn) { return retry(fn, 7, 2, TimeUnit.SECONDS); }
/** * Retry a transformation if it fails. Retries up to <b>retries</b> * times, with an doubling backoff period starting @ <b>delay</b> TimeUnits delay before * retry. * * <pre> * {@code * * * * String result = ReactiveSeq.of( 1, 2, 3) * .retry(this::makeIOCall, 7, 2, TimeUnit.SECONDS) * .firstValue(); * * //result = [service call result] * } * </pre> * * @param fn * Function to retry if fails * @param retries * Number of retries * @param delay * Delay in TimeUnits * @param timeUnit * TimeUnit to use for delay */ default <R> ReactiveSeq<R> retry(final Function<? super T, ? extends R> fn, final int retries, final long delay, final TimeUnit timeUnit) { return (ReactiveSeq) ReactiveTransformable.super.retry(fn, retries, delay, timeUnit); }
@Override default <R> IO<R> retry(Function<? super T, ? extends R> fn) { return (IO<R>)ReactiveTransformable.super.retry(fn); } default <R> IO<R> checkedRetry(CheckedFunction<? super T,? extends R> checkedFunction, int retries, long delay, TimeUnit timeUnit){
/** * Retry a transformation if it fails. Default settings are to retry up to 7 * times, with an doubling backoff period starting @ 2 seconds delay before * retry. * * * @param fn * Function to retry if fails * */ default <R> Transformable<R> retry(final Function<? super T, ? extends R> fn) { return retry(fn, 7, 2, TimeUnit.SECONDS); }
@Override default <R> IO<R> retry(Function<? super T, ? extends R> fn, int retries, long delay, TimeUnit timeUnit) { return (IO<R>)ReactiveTransformable.super.retry(fn,retries,delay,timeUnit); }
/** * Retry a transformation if it fails. Retries up to <b>retries</b> * times, with an doubling backoff period starting @ <b>delay</b> TimeUnits delay before * retry. * * <pre> * {@code * * * * String result = ReactiveSeq.of( 1, 2, 3) * .retry(this::makeIOCall, 7, 2, TimeUnit.SECONDS) * .firstValue(); * * //result = [service call result] * } * </pre> * * @param fn * Function to retry if fails * @param retries * Number of retries * @param delay * Delay in TimeUnits * @param timeUnit * TimeUnit to use for delay */ default <R> ReactiveSeq<R> retry(final Function<? super T, ? extends R> fn, final int retries, final long delay, final TimeUnit timeUnit) { return (ReactiveSeq) ReactiveTransformable.super.retry(fn, retries, delay, timeUnit); }