public final class Interleave<T> extends GraphStage<UniformFanInShape<T,T>>
'''Emits when''' element is available from current input (depending on phase)
'''Backpressures when''' downstream backpressures
'''Completes when''' all upstreams complete (eagerClose=false) or one upstream completes (eagerClose=true)
'''Cancels when''' downstream cancels
Constructor and Description |
---|
Interleave(int inputPorts,
int segmentSize,
boolean eagerClose) |
Modifier and Type | Method and Description |
---|---|
static Graph<S,M> |
addAttributes(Attributes attr) |
static <T> Graph<UniformFanInShape<T,T>,NotUsed> |
apply(int inputPorts,
int segmentSize,
boolean eagerClose)
Create a new
Interleave with the specified number of input ports and given size of elements
to take from each input. |
static Graph<S,M> |
async() |
GraphStageLogic |
createLogic(Attributes inheritedAttributes) |
static scala.Tuple2<GraphStageLogic,NotUsed> |
createLogicAndMaterializedValue(Attributes inheritedAttributes) |
boolean |
eagerClose() |
scala.collection.immutable.IndexedSeq<Inlet<T>> |
in() |
protected static Attributes |
initialAttributes() |
int |
inputPorts() |
static StreamLayout.Module |
module() |
static Graph<S,M> |
named(java.lang.String name) |
Outlet<T> |
out() |
int |
segmentSize() |
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
initialAttributes, module, withAttributes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addAttributes, async, named
public Interleave(int inputPorts, int segmentSize, boolean eagerClose)
public static <T> Graph<UniformFanInShape<T,T>,NotUsed> apply(int inputPorts, int segmentSize, boolean eagerClose)
Interleave
with the specified number of input ports and given size of elements
to take from each input.
inputPorts
- number of input portssegmentSize
- number of elements to send downstream before switching to next input porteagerClose
- if true, interleave completes upstream if any of its upstream 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)
protected static Attributes initialAttributes()
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 int segmentSize()
public boolean eagerClose()
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