Packages

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 stage 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. All

Value Members

  1. def abort(ex: Throwable): Unit

    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).

    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.

    Definition Classes
    UniqueKillSwitchKillSwitch
  2. def shutdown(): Unit

    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).

    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.

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