public final class OrElse<T> extends GraphStage<UniformFanInShape<T,T>>
On errors the stage is failed regardless of source of the error.
'''Emits when''' element is available from primary stream or the primary stream closed without emitting any elements and an element is available from the secondary stream
'''Backpressures when''' downstream backpressures
'''Completes when''' the primary stream completes after emitting at least one element, when the primary stream completes without emitting and the secondary stream already has completed or when the secondary stream completes
'''Cancels when''' downstream cancels
Constructor and Description |
---|
OrElse() |
Modifier and Type | Method and Description |
---|---|
static Graph<S,M> |
addAttributes(Attributes attr) |
static <T> OrElse<T> |
apply() |
static Graph<S,M> |
async() |
GraphStageLogic |
createLogic(Attributes inheritedAttributes) |
static scala.Tuple2<GraphStageLogic,NotUsed> |
createLogicAndMaterializedValue(Attributes inheritedAttributes) |
protected Attributes |
initialAttributes() |
static StreamLayout.Module |
module() |
static Graph<S,M> |
named(java.lang.String name) |
Outlet<T> |
out() |
Inlet<T> |
primary() |
Inlet<T> |
secondary() |
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> OrElse<T> apply()
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 UniformFanInShape<T,T> shape()
Graph
protected Attributes initialAttributes()
initialAttributes
in class GraphStageWithMaterializedValue<UniformFanInShape<T,T>,NotUsed>
public GraphStageLogic createLogic(Attributes inheritedAttributes)
createLogic
in class GraphStage<UniformFanInShape<T,T>>
public java.lang.String toString()
toString
in class java.lang.Object