Class Concat<T>

  • All Implemented Interfaces:

    public final class Concat<T>
    extends GraphStage<UniformFanInShape<T,​T>>
    Takes multiple streams and outputs one stream formed from the input streams by first emitting all of the elements from the first stream and then emitting all of the elements from the second stream, etc.

    A Concat has one first port, one second port and one out port.

    '''Emits when''' the current stream has an element available; if the current input completes, it tries the next one

    '''Backpressures when''' downstream backpressures

    '''Completes when''' all upstreams complete

    '''Cancels when''' downstream cancels

    • Constructor Detail

      • Concat

        public Concat​(int inputPorts)
    • Method Detail

      • apply

        public static <T> Graph<UniformFanInShape<T,​T>,​NotUsed> apply​(int inputPorts)
        Create a new Concat. Note that this for historical reasons creates a "detached" Concat which will eagerly pull each input on materialization and act as a one element buffer for each input.
      • apply

        public static <T> Graph<UniformFanInShape<T,​T>,​NotUsed> apply​(int inputPorts,
                                                                                  boolean detachedInputs)
        Create a new Concat operator that will concatenate two or more streams.
        inputPorts - The number of fan-in input ports
        detachedInputs - If the ports should be detached (eagerly pull both inputs) useful to avoid deadlocks in graphs with loops
      • apply$default$1

        public static <T> int apply$default$1()
      • inputPorts

        public int inputPorts()
      • in

        public scala.collection.immutable.IndexedSeq<Inlet<T>> in()
      • shape

        public UniformFanInShape<T,​T> shape()
        Description copied from interface: Graph
        The shape of a graph is all that is externally visible: its inlets and outlets.
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object