Class MergeSequence<T>
- All Implemented Interfaces:
Graph<UniformFanInShape<T,T>, NotUsed>
*e0*, *e1*, *e2*, ..., *en*
This will output a stream ordered by *k*.
The elements in the input streams must already be sorted according to the sequence. The input streams do not need to be linear, but the aggregate stream must be linear, no element *k* may be skipped or duplicated, either of these conditions will cause the stream to fail.
The typical use case for this is to merge a partitioned stream back
together while maintaining order. This can be achieved by first using
zipWithIndex on the input stream, then partitioning using a
Partition fanout, and then maintaining the index through the processing
of each partition before bringing together with this stage.
'''Emits when''' one of the upstreams has the next expected element in the sequence available.
'''Backpressures when''' downstream backpressures
'''Completes when''' all upstreams complete
'''Cancels when''' downstream cancels
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.pekko.stream.Graph
Graph.GraphMapMatVal<S extends Shape,M> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Graph<UniformFanInShape<T,T>, NotUsed> static <T> intcreateLogic(Attributes inheritedAttributes) intshape()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.GraphStage
createLogicAndMaterializedValueMethods inherited from class org.apache.pekko.stream.stage.GraphStageWithMaterializedValue
initialAttributes, withAttributesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.pekko.stream.Graph
addAttributes, async, async, async, getAttributes, named
-
Constructor Details
-
MergeSequence
-
-
Method Details
-
apply
public static <T> Graph<UniformFanInShape<T,T>, applyNotUsed> (int inputPorts, scala.Function1<T, Object> extractSequence) -
apply$default$1
public static <T> int apply$default$1() -
inputPorts
public int inputPorts() -
shape
Description copied from interface:GraphThe shape of a graph is all that is externally visible: its inlets and outlets. -
createLogic
- Specified by:
createLogicin classGraphStage<UniformFanInShape<T,T>>
-
toString
-