Package akka.stream
Class KillSwitches
- java.lang.Object
-
- akka.stream.KillSwitches
-
public class KillSwitches extends java.lang.Object
Creates a newSharedKillSwitch
with the given name that can be used to control the completion of multiple streams from the outside simultaneously.- See Also:
SharedKillSwitch
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
KillSwitches.KillableGraphStageLogic
static class
KillSwitches.UniqueBidiKillSwitchStage$
static class
KillSwitches.UniqueKillSwitchStage$
-
Constructor Summary
Constructors Constructor Description KillSwitches()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SharedKillSwitch
shared(java.lang.String name)
static <T> Graph<FlowShape<T,T>,UniqueKillSwitch>
single()
static <T1,T2>
Graph<BidiShape<T1,T1,T2,T2>,UniqueKillSwitch>singleBidi()
-
-
-
Method Detail
-
shared
public static SharedKillSwitch shared(java.lang.String name)
-
single
public static <T> Graph<FlowShape<T,T>,UniqueKillSwitch> single()
Creates a newGraph
ofFlowShape
that materializes to an external switch that allows external completion of that unique materialization. Different materializations result in different, independent switches.For a Bidi version see
KillSwitch#singleBidi
- Returns:
- (undocumented)
-
singleBidi
public static <T1,T2> Graph<BidiShape<T1,T1,T2,T2>,UniqueKillSwitch> singleBidi()
Creates a newGraph
ofFlowShape
that materializes to an external switch that allows external completion of that unique materialization. Different materializations result in different, independent switches.For a Flow version see
KillSwitch#single
- Returns:
- (undocumented)
-
-