c

akka.stream

UniqueKillSwitch

final class UniqueKillSwitch extends KillSwitch

A UniqueKillSwitch is always a result of a materialization (unlike SharedKillSwitch which is constructed before any materialization) and it always controls that graph and operator which yielded the materialized value.

After calling UniqueKillSwitch#shutdown the running instance of the Graph of FlowShape 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 UniqueKillSwitch#abort the running instance of the Graph of FlowShape 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.

Source
KillSwitch.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. UniqueKillSwitch
  2. KillSwitch
  3. AnyRef
  4. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. def abort(ex: Throwable): Unit

    After calling the running instance of the of 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).

    After calling the running instance of the of 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.

    Definition Classes
    KillSwitch
  2. def shutdown(): Unit

    After calling the running instance of the of 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).

    After calling the running instance of the of 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.

    Definition Classes
    KillSwitch
  3. def toString(): String
    Definition Classes
    UniqueKillSwitch → AnyRef → Any