Package org.apache.pekko.stream.scaladsl
Class MergePrioritized<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.MergePrioritized<T>
- All Implemented Interfaces:
Graph<UniformFanInShape<T,T>, NotUsed>
Merge several streams, taking elements as they arrive from input streams
(picking from prioritized once when several have elements ready).
A MergePrioritized has one out port, one or more input port with their priorities.
'''Emits when''' one of the inputs has an element available, preferring a input based on its priority 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
-
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> GraphStage<UniformFanInShape<T,T>> Create a newMergePrioritizedwith specified number of input ports.static <T> booleancreateLogic(Attributes inheritedAttributes) booleanin()out()scala.collection.immutable.Seq<Object>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.GraphStage
createLogicAndMaterializedValueMethods inherited from class org.apache.pekko.stream.stage.GraphStageWithMaterializedValue
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
-
MergePrioritized
public MergePrioritized()
-
-
Method Details
-
apply
public static <T> GraphStage<UniformFanInShape<T,T>> apply(scala.collection.immutable.Seq<Object> priorities, boolean eagerComplete) Create a newMergePrioritizedwith specified number of input ports.- Parameters:
priorities- priorities of the input portseagerComplete- if true, the merge will complete as soon as one of its inputs completes.
-
apply$default$2
public static <T> boolean apply$default$2() -
priorities
-
eagerComplete
public boolean eagerComplete() -
in
-
out
-
initialAttributes
- Overrides:
initialAttributesin classGraphStageWithMaterializedValue<UniformFanInShape<T,T>, NotUsed>
-
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
-