Package org.apache.pekko.stream.scaladsl
Class Concat<T>
java.lang.Object
org.apache.pekko.stream.stage.GraphStageWithMaterializedValue<S,NotUsed>
 
org.apache.pekko.stream.stage.GraphStage<UniformFanInShape<T,T>>
 
org.apache.pekko.stream.scaladsl.Concat<T>
- All Implemented Interfaces:
- Graph<UniformFanInShape<T,- T>, - NotUsed> 
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
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.apache.pekko.stream.GraphGraph.GraphMapMatVal<S extends Shape,M> 
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic <T> Graph<UniformFanInShape<T,T>, NotUsed> apply(int inputPorts) Create a newConcat.static <T> Graph<UniformFanInShape<T,T>, NotUsed> apply(int inputPorts, boolean detachedInputs) Create a newConcatoperator that will concatenate two or more streams.static <T> intcreateLogic(Attributes inheritedAttributes) in()intout()shape()The shape of a graph is all that is externally visible: its inlets and outlets.toString()Methods inherited from class org.apache.pekko.stream.stage.GraphStagecreateLogicAndMaterializedValueMethods inherited from class org.apache.pekko.stream.stage.GraphStageWithMaterializedValuewithAttributesMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.pekko.stream.GraphaddAttributes, async, async, async, getAttributes, named
- 
Constructor Details- 
Concatpublic Concat(int inputPorts) 
 
- 
- 
Method Details- 
applyCreate a newConcat. 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.
- 
applypublic static <T> Graph<UniformFanInShape<T,T>, applyNotUsed> (int inputPorts, boolean detachedInputs) Create a newConcatoperator that will concatenate two or more streams.- Parameters:
- 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
- Returns:
 
- 
apply$default$1public static <T> int apply$default$1()
- 
inputPortspublic int inputPorts()
- 
in
- 
out
- 
initialAttributes- Overrides:
- initialAttributesin class- GraphStageWithMaterializedValue<UniformFanInShape<T,- T>, - NotUsed> 
 
- 
shapeDescription copied from interface:GraphThe shape of a graph is all that is externally visible: its inlets and outlets.
- 
createLogic- Specified by:
- createLogicin class- GraphStage<UniformFanInShape<T,- T>> 
 
- 
toString
 
-