Packages

c

akka.stream

SharedKillSwitch

final class SharedKillSwitch extends KillSwitch

A SharedKillSwitch is a provider for Graphs of FlowShape that can be completed or failed from the outside. A Graph returned by the switch can be materialized arbitrary amount of times: every newly materialized Graph belongs to the switch from which it was acquired. Multiple SharedKillSwitch instances are isolated from each other, shutting down or aborting on instance does not affect the Graphs provided by another instance.

After calling SharedKillSwitch#shutdown() all materialized, running instances of all Graphs provided by the SharedKillSwitch will complete their downstreams and cancel their upstreams (unless if finished or failed already in which case the command is ignored). Subsequent invocations of SharedKillSwitch#shutdown() and SharedKillSwitch#abort() will be ignored.

After calling SharedKillSwitch#abort() all materialized, running instances of all Graphs provided by the SharedKillSwitch will fail their downstreams with the provided exception and cancel their upstreams (unless it finished or failed already in which case the command is ignored). Subsequent invocations of SharedKillSwitch#shutdown() and SharedKillSwitch#abort() will be ignored.

The Graphs provided by the SharedKillSwitch do not modify the passed through elements in any way or affect backpressure in the stream. All provided Graphs provide the parent SharedKillSwitch as materialized value.

This class is thread-safe, the instance can be passed safely among threads and its methods may be invoked concurrently.

Source
KillSwitch.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SharedKillSwitch
  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. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from SharedKillSwitch to any2stringadd[SharedKillSwitch] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (SharedKillSwitch, B)
    Implicit
    This member is added by an implicit conversion from SharedKillSwitch to ArrowAssoc[SharedKillSwitch] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. def abort(reason: Throwable): Unit

    After calling SharedKillSwitch#abort() all materialized, running instances of all Graphs provided by the SharedKillSwitch will fail their downstreams with the provided exception and cancel their upstreams (unless it finished or failed already in which case the command is ignored).

    After calling SharedKillSwitch#abort() all materialized, running instances of all Graphs provided by the SharedKillSwitch will fail their downstreams with the provided exception and cancel their upstreams (unless it finished or failed already in which case the command is ignored). Subsequent invocations of SharedKillSwitch#shutdown() and SharedKillSwitch#abort() will be ignored.

    These provided Graphs materialize to their owning switch. This might make certain integrations simpler than passing around the switch instance itself.

    reason

    The exception to be used for failing the linked Graphs

    Definition Classes
    SharedKillSwitchKillSwitch
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate() @throws( ... )
  9. def ensuring(cond: (SharedKillSwitch) ⇒ Boolean, msg: ⇒ Any): SharedKillSwitch
    Implicit
    This member is added by an implicit conversion from SharedKillSwitch to Ensuring[SharedKillSwitch] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: (SharedKillSwitch) ⇒ Boolean): SharedKillSwitch
    Implicit
    This member is added by an implicit conversion from SharedKillSwitch to Ensuring[SharedKillSwitch] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean, msg: ⇒ Any): SharedKillSwitch
    Implicit
    This member is added by an implicit conversion from SharedKillSwitch to Ensuring[SharedKillSwitch] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean): SharedKillSwitch
    Implicit
    This member is added by an implicit conversion from SharedKillSwitch to Ensuring[SharedKillSwitch] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  15. def flow[T]: Graph[FlowShape[T, T], SharedKillSwitch]

    Returns a typed Flow of a requested type that will be linked to this SharedKillSwitch instance.

    Returns a typed Flow of a requested type that will be linked to this SharedKillSwitch instance. By invoking SharedKillSwitch#shutdown() or SharedKillSwitch#abort() all running instances of all provided Graphs by this switch will be stopped normally or failed.

    T

    Type of the elements the Flow will forward

    returns

    A reusable Graph that is linked with the switch. The materialized value provided is this switch itself.

  16. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from SharedKillSwitch to StringFormat[SharedKillSwitch] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  17. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  18. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. val name: String
  21. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  24. def shutdown(): Unit

    After calling SharedKillSwitch#shutdown() all materialized, running instances of all Graphs provided by the SharedKillSwitch will complete their downstreams and cancel their upstreams (unless if finished or failed already in which case the command is ignored).

    After calling SharedKillSwitch#shutdown() all materialized, running instances of all Graphs provided by the SharedKillSwitch will complete their downstreams and cancel their upstreams (unless if finished or failed already in which case the command is ignored). Subsequent invocations of SharedKillSwitch#shutdown() and SharedKillSwitch#abort() will be ignored.

    Definition Classes
    SharedKillSwitchKillSwitch
  25. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  26. def toString(): String
    Definition Classes
    SharedKillSwitch → AnyRef → Any
  27. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  29. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. def [B](y: B): (SharedKillSwitch, B)
    Implicit
    This member is added by an implicit conversion from SharedKillSwitch to ArrowAssoc[SharedKillSwitch] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from KillSwitch

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from SharedKillSwitch to any2stringadd[SharedKillSwitch]

Inherited by implicit conversion StringFormat from SharedKillSwitch to StringFormat[SharedKillSwitch]

Inherited by implicit conversion Ensuring from SharedKillSwitch to Ensuring[SharedKillSwitch]

Inherited by implicit conversion ArrowAssoc from SharedKillSwitch to ArrowAssoc[SharedKillSwitch]

Ungrouped