java.lang.Object
io.smallrye.mutiny.groups.MultiOnItemTimeout<T>
-
Constructor Summary
ConstructorsConstructorDescriptionMultiOnItemTimeout(Multi<T> upstream, Duration timeout, ScheduledExecutorService executor) -
Method Summary
Modifier and TypeMethodDescriptionfail()on(ScheduledExecutorService executor) Configures on which executor the timeout is measured.recoverWithMulti(Multi<? extends T> fallback) recoverWithMulti(Supplier<Multi<? extends T>> supplier)
-
Constructor Details
-
MultiOnItemTimeout
-
-
Method Details
-
on
Configures on which executor the timeout is measured. Note that this executor is also going to be used to fire theTimeoutfailure event.- Parameters:
executor- the executor to use, must not benull- Returns:
- a new
MultiOnItemTimeout
-
fail
-
failWith
-
failWith
-
recoverWithCompletion
Produces a newMultifiring a completion when the currentMultidoes not emit an item before the timeout.- Returns:
- the new
Multi
-
recoverWithMulti
Produces a newMultiproviding a fallbackMultiwhen the currentMultitimes out. The fallback is produced using the given supplier, and is called when the failure is caught. The producedMultiis used instead of the currentMulti.- Parameters:
supplier- the fallback supplier, must not benull, must not producenull- Returns:
- the new
Multi
-
recoverWithMulti
-