Click or drag to resize
Akka.NETSharedKillSwitch Class
A SharedKillSwitch is a provider for IGraphTShapes of FlowShapeTIn, TOut that can be completed or failed from the outside. A IGraphTShape returned by the switch can be materialized arbitrary amount of times: every newly materializedIGraphTShape 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 IGraphTShapes provided by another instance. After calling Shutdown all materialized, running instances of all IGraphTShapes 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 Shutdown and Abort(Exception) will be ignored. After calling Abort(Exception) all materialized, running instances of all IGraphTShapes 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 Shutdown and Abort(Exception) will be ignored. The IGraphTShapes provided by the SharedKillSwitch do not modify the passed through elements in any way or affect backpressure in the stream. All provided IGraphTShapes 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.
Inheritance Hierarchy
SystemObject
  Akka.StreamsSharedKillSwitch

Namespace:  Akka.Streams
Assembly:  Akka.Streams (in Akka.Streams.dll) Version: 1.2.3.129 (1.2.3.129)
Syntax
public sealed class SharedKillSwitch : IKillSwitch

The SharedKillSwitch type exposes the following members.

Methods
  NameDescription
Public methodAbort
After calling Abort(Exception) all materialized, running instances of all IGraphTShapes 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 Shutdown and Abort(Exception) will be ignored. These provided IGraphTShapes materialize to their owning switch. This might make certain integrations simpler than passing around the switch instance itself.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFlowT
Returns a typed Flow of a requested type that will be linked to this SharedKillSwitch instance. By invoking Shutdown or Abort(Exception) all running instances of all provided IGraphTShapes by this switch will be stopped normally or failed.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodShutdown
After calling Shutdown all materialized, running instances of all IGraphTShapes 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 Shutdown and Abort(Exception) will be ignored.
Public methodToString
TBD
(Overrides ObjectToString.)
Top
Extension Methods
See Also