final class MergePreferred[T] extends GraphStage[MergePreferredShape[T]]
Merge several streams, taking elements as they arrive from input streams (picking from preferred when several have elements ready).
A MergePreferred
has one out
port, one preferred
input port and 0 or more secondary in
ports.
Emits when one of the inputs has an element available, preferring a specified input 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
A Broadcast
has one in
port and 2 or more out
ports.
- Source
- Graph.scala
- Alphabetic
- By Inheritance
- MergePreferred
- GraphStage
- GraphStageWithMaterializedValue
- Graph
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Type Members
-
type
Shape = MergePreferredShape[T]
Type-level accessor for the shape parameter of this graph.
Type-level accessor for the shape parameter of this graph.
- Definition Classes
- Graph
Value Members
-
def
addAttributes(attr: Attributes): Graph[MergePreferredShape[T], NotUsed]
- Definition Classes
- Graph
-
def
async: Graph[MergePreferredShape[T], NotUsed]
Put an asynchronous boundary around this
Graph
Put an asynchronous boundary around this
Graph
- Definition Classes
- Graph
-
def
createLogic(inheritedAttributes: Attributes): GraphStageLogic
- Definition Classes
- MergePreferred → GraphStage
-
final
def
createLogicAndMaterializedValue(inheritedAttributes: Attributes): (GraphStageLogic, NotUsed)
- Definition Classes
- GraphStage → GraphStageWithMaterializedValue
- val eagerComplete: Boolean
- def in(id: Int): Inlet[T]
-
def
initialAttributes: Attributes
- Definition Classes
- MergePreferred → GraphStageWithMaterializedValue
-
final
lazy val
module: Module
INTERNAL API.
INTERNAL API.
Every materializable element must be backed by a stream layout module
- Definition Classes
- GraphStageWithMaterializedValue → Graph
-
def
named(name: String): Graph[MergePreferredShape[T], NotUsed]
- Definition Classes
- Graph
- def out: Outlet[T]
- def preferred: Inlet[T]
- val secondaryPorts: Int
-
val
shape: MergePreferredShape[T]
- Definition Classes
- MergePreferred → Graph
-
final
def
withAttributes(attr: Attributes): Graph[MergePreferredShape[T], NotUsed]
- Definition Classes
- GraphStageWithMaterializedValue → Graph