Class UniqueKillSwitch
A UniqueKillSwitch is always a result of a materialization (unlike SharedKillSwitch which is constructed before any materialization) and it always controls that graph and stage which yielded the materialized value.
After calling Shutdown() the running instance of the IGraph<TShape> of FlowShape<TIn, TOut> that materialized to the UniqueKillSwitch will complete its downstream and cancel its upstream (unless if finished or failed already in which case the command is ignored). Subsequent invocations of completion commands will be ignored.
After calling Abort(Exception) the running instance of the IGraph<TShape> of FlowShape<TIn, TOut> that materialized to the UniqueKillSwitch will fail its downstream with the provided exception and cancel its upstream (unless if finished or failed already in which case the command is ignored). Subsequent invocations of completion commands will be ignored.
It is also possible to individually cancel, complete or fail upstream and downstream parts by calling the corresponding methods.
Implements
Inherited Members
Namespace: Akka.Streams
Assembly: Akka.Streams.dll
Syntax
public sealed class UniqueKillSwitch : IKillSwitch
Methods
| Improve this Doc View SourceAbort(Exception)
After calling Abort(Exception) the running instance of the IGraph<TShape> of FlowShape<TIn, TOut> that materialized to the UniqueKillSwitch will fail its downstream with the provided exception and cancel its upstream (unless if finished or failed already in which case the command is ignored). Subsequent invocations of completion commands will be ignored.
Declaration
public void Abort(Exception cause)
Parameters
Type | Name | Description |
---|---|---|
Exception | cause | TBD |
Shutdown()
After calling Shutdown() the running instance of the IGraph<TShape> of FlowShape<TIn, TOut> that materialized to the UniqueKillSwitch will complete its downstream and cancel its upstream (unless if finished or failed already in which case the command is ignored). Subsequent invocations of completion commands will be ignored.
Declaration
public void Shutdown()
ToString()
TBD
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | TBD |