public final class Merge<T> extends GraphStage<UniformFanInShape<T,T>>
'''Emits when''' one of the inputs has an element 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
Constructor and Description |
---|
Merge(int inputPorts,
boolean eagerComplete) |
Modifier and Type | Method and Description |
---|---|
static Graph<S,M> |
addAttributes(Attributes attr) |
static <T> Merge<T> |
apply(int inputPorts,
boolean eagerComplete)
Create a new
Merge with the specified number of input ports. |
static Graph<S,M> |
async() |
GraphStageLogic |
createLogic(Attributes inheritedAttributes) |
static scala.Tuple2<GraphStageLogic,NotUsed> |
createLogicAndMaterializedValue(Attributes inheritedAttributes) |
boolean |
eagerComplete() |
scala.collection.immutable.IndexedSeq<Inlet<T>> |
in() |
Attributes |
initialAttributes() |
int |
inputPorts() |
static StreamLayout.Module |
module() |
static Graph<S,M> |
named(java.lang.String name) |
Outlet<T> |
out() |
UniformFanInShape<T,T> |
shape()
The shape of a graph is all that is externally visible: its inlets and outlets.
|
java.lang.String |
toString() |
static Graph<S,M> |
withAttributes(Attributes attr) |
createLogicAndMaterializedValue
module, withAttributes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addAttributes, async, named
public static <T> Merge<T> apply(int inputPorts, boolean eagerComplete)
Merge
with the specified number of input ports.
inputPorts
- number of input portseagerComplete
- if true, the merge will complete as soon as one of its inputs completes.public static Graph<S,M> named(java.lang.String name)
public static Graph<S,M> async()
public static Graph<S,M> addAttributes(Attributes attr)
public static final StreamLayout.Module module()
public static final Graph<S,M> withAttributes(Attributes attr)
public static final scala.Tuple2<GraphStageLogic,NotUsed> createLogicAndMaterializedValue(Attributes inheritedAttributes)
public int inputPorts()
public boolean eagerComplete()
public Attributes initialAttributes()
initialAttributes
in class GraphStageWithMaterializedValue<UniformFanInShape<T,T>,NotUsed>
public UniformFanInShape<T,T> shape()
Graph
public GraphStageLogic createLogic(Attributes inheritedAttributes)
createLogic
in class GraphStage<UniformFanInShape<T,T>>
public java.lang.String toString()
toString
in class java.lang.Object