Module mutiny.zero
Package mutiny.zero

Interface AsyncHelpers


public interface AsyncHelpers
  • Method Details

    • applyExceptionally

      static <T> CompletionStage<T> applyExceptionally(CompletionStage<T> upstream, Function<Throwable,Throwable> mapper)
      Applies a function on failure to produce another failure.
      Type Parameters:
      T - the type of emitted item
      Parameters:
      upstream - the upstream stage.
      mapper - the mapper
      Returns:
      the mapped completion stage.
    • composeExceptionally

      static <T> CompletionStage<T> composeExceptionally(CompletionStage<T> upstream, Function<Throwable,CompletionStage<T>> mapper)
      Composes the given completion stage on failure.
      Type Parameters:
      T - the type of emitted item
      Parameters:
      upstream - the upstream stage
      mapper - the mapper
      Returns:
      the composed completion stage.