/** * @return The same behavior of MIT Proto's nbrdelay (forward view). */ public Field nbrDelay() { return buildField(Functions.identity(), getDeltaTime()); }
downstream.accumulator(), downstream.combiner(), Functions.andThen(downstream.finisher(), (finisher)), characteristics);
downstream.accumulator(), downstream.combiner(), Functions.andThen(downstream.finisher(), finisher), characteristics);
@Override public CompletionStage<T> apply(T r, Throwable ex) { return (ex == null) ? thisStage : thisStage.handleAsync(new BiFunction<T, Throwable, CompletionStage<T>>() { @Override public CompletionStage<T> apply(T r1, Throwable ex1) { return fn.apply(ex1); } }, executor).thenCompose(Functions.<CompletionStage<T>>identity()); } }).thenCompose(Functions.<CompletionStage<T>>identity());
@Override public CompletionStage<T> apply(T r, Throwable ex) { return (ex == null) ? thisStage : thisStage.handleAsync(new BiFunction<T, Throwable, CompletionStage<T>>() { @Override public CompletionStage<T> apply(T r1, Throwable ex1) { return fn.apply(ex1); } }).thenCompose(Functions.<CompletionStage<T>>identity()); } }).thenCompose(Functions.<CompletionStage<T>>identity());
/** * Returns a new CompletionStage that, when {@code thisStage} completes * exceptionally, is composed using the results of the supplied * function applied to {@code thisStage}'s exception. * * <p><b>Implementation Requirements:</b><br> The default * implementation invokes {@link CompletionStage#handle}, invoking the * given function on exception, then {@link CompletionStage#thenCompose} * for result. * * @param <T> the CompletionStage's element type * @param thisStage the CompletionStage to compose with * @param fn the function to use to compute the returned * CompletionStage if the {@code thisStage} CompletionStage completed * exceptionally * @return the new CompletionStage * @since 12 */ public static <T> CompletionStage<T> exceptionallyCompose (final CompletionStage<T> thisStage, final Function<Throwable, ? extends CompletionStage<T>> fn) { return thisStage.handle(new BiFunction<T, Throwable, CompletionStage<T>>() { @Override public CompletionStage<T> apply(T r, Throwable ex) { return (ex == null) ? thisStage : fn.apply(ex); } }).thenCompose(Functions.<CompletionStage<T>>identity()); }
}).thenCompose(Functions.<CompletionStage<T>>identity());
}).thenCompose(Functions.<CompletionStage<T>>identity());
}).thenCompose(Functions.<CompletionStage<T>>identity());
}).thenCompose(Functions.<CompletionStage<T>>identity());