- All Superinterfaces:
- Enclosing interface:
public static interface Stage.FlatMapCompletionStage extends StageA flat map stage that emits and flattens
The flat map stage must execute the given mapper on each element, and concatenate the values redeemed by the
CompletionStage's emitted by the mapper function into the resulting stream.
The engine must ensure only one mapper function is executed at a time, with the next mapper function not executing until the
CompletionStagereturned by the previous mapper function has been redeemed.
RuntimeExceptionthrown by the function must be propagated downstream as an error, and upstream must be cancelled. Any subsequent elements received from upstream before the cancellation signal is handled must be dropped.
If downstream cancels, then upstream must be cancelled, and if there is a currently executing
CompletionStage, its result must be ignored.
CompletionStageis redeemed with an error, upstream must be cancelled, and the error must be propagated downstream. Any subsequent elements received from upstream before the cancellation signal is handled must be dropped.
If upstream terminates with an error, then implementations may decide to ignore the result of any currently executing
CompletionStage, and propagate the error immediately, or they may wait for the
CompletionStageto be redeemed, emit its result, and then propagate the error downstream. For the purpose of failing fast, so that network failures can be detected and handled, it is recommended, but not required, that the failure is propagated downstream as soon as possible, and the result of the
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.microprofile.reactive.streams.operators.spi.Stage
Stage.Cancel, Stage.Collect, Stage.Concat, Stage.Coupled, Stage.Distinct, Stage.DropWhile, Stage.Failed, Stage.Filter, Stage.FindFirst, Stage.FlatMap, Stage.FlatMapCompletionStage, Stage.FlatMapIterable, Stage.FromCompletionStage, Stage.FromCompletionStageNullable, Stage.Limit, Stage.Map, Stage.Of, Stage.OnComplete, Stage.OnError, Stage.OnErrorResume, Stage.OnErrorResumeWith, Stage.OnTerminate, Stage.Peek, Stage.ProcessorStage, Stage.PublisherStage, Stage.Skip, Stage.SubscriberStage, Stage.TakeWhile