public final class Broadcast<T> extends GraphStage<UniformFanOutShape<T,T>>
'''Emits when''' all of the outputs stops backpressuring and there is an input element available
'''Backpressures when''' any of the outputs backpressure
'''Completes when''' upstream completes
'''Cancels when''' If eagerCancel is enabled: when any downstream cancels; otherwise: when all downstreams cancel
Constructor and Description |
---|
Broadcast(int outputPorts,
boolean eagerCancel) |
Modifier and Type | Method and Description |
---|---|
static Graph<S,M> |
addAttributes(Attributes attr) |
static <T> Broadcast<T> |
apply(int outputPorts,
boolean eagerCancel)
Create a new
Broadcast with the specified number of output ports. |
static Graph<S,M> |
async() |
GraphStageLogic |
createLogic(Attributes inheritedAttributes) |
static scala.Tuple2<GraphStageLogic,NotUsed> |
createLogicAndMaterializedValue(Attributes inheritedAttributes) |
boolean |
eagerCancel() |
Inlet<T> |
in() |
Attributes |
initialAttributes() |
static StreamLayout.Module |
module() |
static Graph<S,M> |
named(java.lang.String name) |
scala.collection.immutable.IndexedSeq<Outlet<T>> |
out() |
int |
outputPorts() |
UniformFanOutShape<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> Broadcast<T> apply(int outputPorts, boolean eagerCancel)
Broadcast
with the specified number of output ports.
outputPorts
- number of output portseagerCancel
- if true, broadcast cancels upstream if any of its downstreams cancel.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 outputPorts()
public boolean eagerCancel()
public Attributes initialAttributes()
initialAttributes
in class GraphStageWithMaterializedValue<UniformFanOutShape<T,T>,NotUsed>
public UniformFanOutShape<T,T> shape()
Graph
public GraphStageLogic createLogic(Attributes inheritedAttributes)
createLogic
in class GraphStage<UniformFanOutShape<T,T>>
public java.lang.String toString()
toString
in class java.lang.Object