Class MergePreferred<T>

  • All Implemented Interfaces:
    Graph<MergePreferred.MergePreferredShape<T>,​NotUsed>

    public final class MergePreferred<T>
    extends GraphStage<MergePreferred.MergePreferredShape<T>>
    Merge several streams, taking elements as they arrive from input streams (picking from preferred when several have elements ready).

    A MergePreferred has one out port, one preferred input port and 1 or more secondary in ports.

    '''Emits when''' one of the inputs has an element available, preferring a specified input if multiple have elements available

    '''Backpressures when''' downstream backpressures

    '''Completes when''' all upstreams complete (eagerComplete=false) or one upstream completes (eagerComplete=true), default value is false

    '''Cancels when''' downstream cancels