Class MultiOnItemTimeout<T>

java.lang.Object
io.smallrye.mutiny.groups.MultiOnItemTimeout<T>

public class MultiOnItemTimeout<T> extends Object
  • Constructor Details

  • Method Details

    • on

      Configures on which executor the timeout is measured. Note that this executor is also going to be used to fire the Timeout failure event.
      Parameters:
      executor - the executor to use, must not be null
      Returns:
      a new MultiOnItemTimeout
    • fail

      @CheckReturnValue public Multi<T> fail()
    • failWith

      @CheckReturnValue public Multi<T> failWith(Throwable failure)
    • failWith

      @CheckReturnValue public Multi<T> failWith(Supplier<? extends Throwable> supplier)
    • recoverWithCompletion

      @CheckReturnValue public Multi<T> recoverWithCompletion()
      Produces a new Multi firing a completion when the current Multi does not emit an item before the timeout.
      Returns:
      the new Multi
    • recoverWithMulti

      @CheckReturnValue public Multi<T> recoverWithMulti(Supplier<Multi<? extends T>> supplier)
      Produces a new Multi providing a fallback Multi when the current Multi times out. The fallback is produced using the given supplier, and is called when the failure is caught. The produced Multi is used instead of the current Multi.
      Parameters:
      supplier - the fallback supplier, must not be null, must not produce null
      Returns:
      the new Multi
    • recoverWithMulti

      @CheckReturnValue public Multi<T> recoverWithMulti(Multi<? extends T> fallback)
      Produces a new Multi providing a fallback Multi when the current Multi times out. The fallback Multi is used instead of the current Multi.
      Parameters:
      fallback - the fallback Multi, must not be null
      Returns:
      the new Multi