Click or drag to resize
Akka.NETAkka.Streams.Stage Namespace
TBD
Classes
  ClassDescription
Public classAbstractStageTIn, TOut Obsolete.
TBD
Public classAbstractStageTIn, TOut, TPushDirective, TPullDirective, TContext Obsolete.
TBD
Public classConditionalTerminateInput
Input handler that terminates the state upon receiving completion if the given condition holds at that time.The stage fails upon receiving a failure.
Public classConditionalTerminateOutput
Output handler that terminates the state upon receiving completion if the given condition holds at that time.The stage fails upon receiving a failure.
Public classDetachedStageTIn, TOut Obsolete.
DetachedStage can be used to implement operations similar to BufferTIn, TOut, TMat(FlowTIn, TOut, TMat, Int32, OverflowStrategy), ExpandTIn, TOut1, TOut2, TMat(FlowTIn, TOut1, TMat, FuncTOut1, IEnumeratorTOut2) and ConflateTIn, TOut, TMat(FlowTIn, TOut, TMat, FuncTOut, TOut, TOut). DetachedStage implementations are boundaries between 1-bounded regions. This means that they need to enforce the "exactly one" property both on their upstream and downstream regions. As a consequence a DetachedStage can never answer an OnPull(IContext) with a Pull or answer an OnPush(TIn, IContext) with a Push(Object) since such an action would "steal" the event from one region (resulting in zero signals) and would inject it to the other region (resulting in two signals). However, DetachedStages have the ability to call HoldUpstream and HoldDownstream as a response to OnPush(TIn, IContext) and OnPull(IContext) which temporarily takes the signal off and stops execution, at the same time putting the stage in an IsHoldingBoth state. If the stage is in a holding state it contains one absorbed signal, therefore in this state the only possible command to call is PushAndPull(Object) which results in two events making the balance right again: 1 hold + 1 external event = 2 external event This mechanism allows synchronization between the upstream and downstream regions which otherwise can progress independently. @see PushPullStageTIn, TOut
Public classEagerTerminateInput
Input handler that terminates the stage upon receiving completion. The stage fails upon receiving a failure.
Public classEagerTerminateOutput
Output handler that terminates the stage upon cancellation.
Public classFreeDirective
TBD
Public classGraphStageTShape
A GraphStage represents a reusable graph stream processing stage. A GraphStage consists of a Shape which describes its input and output ports and a factory function that creates a GraphStageLogic which implements the processing logic that ties the ports together.
Public classGraphStageLogic
Represents the processing logic behind a GraphStageTShape. Roughly speaking, a subclass of GraphStageLogic is a collection of the following parts:

* A set of InHandler and OutHandler instances and their assignments to the Inlets and Outlets of the enclosing GraphStageTShape

* Possible mutable state, accessible from the InHandler and OutHandler callbacks, but not from anywhere else (as such access would not be thread-safe)

* The lifecycle hooks PreStart and PostStop

* Methods for performing stream processing actions, like pulling or pushing elements

The stage logic is always stopped once all its input and output ports have been closed, i.e. it is not possible to keep the stage alive for further processing once it does not have any open ports.
Protected classGraphStageLogicLambdaInHandler
TBD
Protected classGraphStageLogicLambdaOutHandler
TBD
Protected classGraphStageLogicSubSinkInletT
INTERNAL API This allows the dynamic creation of an Inlet for a GraphStage which is connected to a Sink that is available for materialization (e.g. using the SubFusingMaterializer). Care needs to be taken to cancel this Inlet when the stage shuts down lest the corresponding Sink be left hanging.
Protected classGraphStageLogicSubSourceOutletT
INTERNAL API This allows the dynamic creation of an Outlet for a GraphStage which is connected to a Source that is available for materialization (e.g. using the SubFusingMaterializer). Care needs to be taken to complete this Outlet when the stage shuts down lest the corresponding Sink be left hanging. It is good practice to use the Timeout(TimeSpan) method to cancel this Outlet in case the corresponding Source is not materialized within a given time limit, see e.g. ActorMaterializerSettings.
Public classGraphStageWithMaterializedValueTShape, TMaterialized
TBD
Public classIgnoreTerminateInput
Input handler that does not terminate the stage upon receiving completion. The stage fails upon receiving a failure.
Public classIgnoreTerminateOutput
Output handler that does not terminate the stage upon cancellation.
Public classInAndOutGraphStageLogic
Public classInAndOutHandler
Public classInGraphStageLogic
Public classInHandler
Public classOutGraphStageLogic
Public classOutHandler
Public classPushPullGraphStageTIn, TOut
TBD
Public classPushPullGraphStageWithMaterializedValueTIn, TOut, TMat
TBD
Public classPushPullStageTIn, TOut Obsolete.

PushPullStageTIn, TOut implementations participate in 1-bounded regions. For every external non-completion signal these stages produce *exactly one* push or pull signal.

OnPush(TIn, IContext) is called when an element from upstream is available and there is demand from downstream, i.e. in OnPush(TIn, IContext) you are allowed to call Push(Object) to emit one element downstream, or you can absorb the element by calling Pull. Note that you can only emit zero or one element downstream from OnPull(IContext). To emit more than one element you have to push the remaining elements from OnPush(TIn, IContext), one-by-one. OnPush(TIn, IContext) is not called again until OnPull(IContext) has requested more elements with Pull.

StatefulStageTIn, TOut has support for making it easy to emit more than one element from OnPush(TIn, IContext).

OnPull(IContext)> is called when there is demand from downstream, i.e. you are allowed to push one element downstream with Push(Object), or request elements from upstreams with Pull. If you always perform transitive pull by calling Pull from OnPull(IContext) you can use PushStageTIn, TOut instead of PushPullStageTIn, TOut.

Stages are allowed to do early completion of downstream and cancel of upstream. This is done with Finish, which is a combination of cancel/complete.

Since OnComplete is not a backpressured signal it is sometimes preferable to push a final element and then immediately finish. This combination is exposed as PushAndFinish(Object) which enables stages to propagate completion events without waiting for an extra round of pull.

Another peculiarity is how to convert termination events (complete/failure) into elements. The problem here is that the termination events are not backpressured while elements are. This means that simply calling Push(Object) as a response to OnUpstreamFinish(IContext) or OnUpstreamFailure(Exception, IContext) will very likely break boundedness and result in a buffer overflow somewhere. Therefore the only allowed command in this case is AbsorbTermination which stops the propagation of the termination signal, and puts the stage in a IsFinishing state. Depending on whether the stage has a pending pull signal it has not yet "consumed" by a push its OnPull(IContext) handler might be called immediately or later. From OnPull(IContext) final elements can be pushed before completing downstream with Finish or PushAndFinish(Object).

StatefulStageTIn, TOut has support for making it easy to emit final elements.

All these rules are enforced by types and runtime checks where needed. Always return the Directive from the call to the IContext method, and do only call IContext commands once per callback.

Public classPushStageTIn, TOut Obsolete.
Public classStageActorRef
Minimal actor to work with other actors and watch them in a synchronous ways.
Public classStageActorRefNotInitializedException
TBD
Public classStageStateTIn, TOut
Public classStatefulStage
TBD
Public classStatefulStageTIn, TOut Obsolete.
StatefulStageTIn, TOut is a PushPullStageTIn, TOut that provides convenience to make some things easier. The behavior is defined in StageStateTIn, TOut instances. The initial behavior is specified by subclass implementing the Initial method. The behavior can be changed by using Become(StageStateTIn, TOut). Use Emit(IEnumeratorTOut, IContextTOut, StageStateTIn, TOut) or EmitAndFinish(IEnumeratorTOut, IContextTOut) to push more than one element from OnPush(TIn, IContextTOut) or OnPull(IContextTOut). Use TerminationEmit(IEnumeratorTOut, IContextTOut) to push final elements from OnUpstreamFinish(IContextTOut) or OnUpstreamFailure(Exception, IContext).
Public classTimerGraphStageLogic
TBD
Public classTotallyIgnorantInput
Input handler that does not terminate the stage upon receiving completion nor failure.
Structures
Interfaces
  InterfaceDescription
Public interfaceIAsyncContext
This kind of context is available to IAsyncContextTOut, TExt. It implements the same interface as for IDetachedContext with the addition of being able to obtain AsyncCallback objects that allow the registration of asynchronous notifications.
Public interfaceIAsyncContextTOut, TExt
TBD
Public interfaceIAsyncDirective
TBD
Public interfaceIBoundaryContext
TBD
Public interfaceIContext
Public interfaceIContextTOut
TBD
Public interfaceIDetachedContext
Passed to the callback methods of DetachedStageTIn, TOut. HoldDownstream and HoldUpstream stops execution and at the same time putting the stage in a holding state. If the stage is in a holding state it contains one absorbed signal, therefore in this state the only possible command to call is PushAndPull(Object) which results in two events making the balance right again: 1 hold + 1 external event = 2 external event
Public interfaceIDetachedContextTOut
TBD
Public interfaceIDirective
TBD
Public interfaceIDownstreamDirective
TBD
Public interfaceIGraphStageWithMaterializedValueTShape, TMaterialized
TBD
Public interfaceIInHandler
Public interfaceILifecycleContext
TBD
Public interfaceILogicAndMaterializedValueTMaterialized
TBD
Public interfaceIOutHandler
Public interfaceIStageTIn, TOut Obsolete.
General interface for stream transformation. Custom IStageTIn, TOut implementations are intended to be used with TransformTIn, TOut1, TOut2, TMat(FlowTIn, TOut1, TMat, FuncIStageTOut1, TOut2) to extend the FlowOperations API when there is no specialized operator that performs the transformation. Custom implementations are subclasses of PushPullStageTIn, TOut or DetachedStageTIn, TOut. Sometimes it is convenient to extend StatefulStageTIn, TOut for support of become like behavior. It is possible to keep state in the concrete IStageTIn, TOut instance with ordinary instance variables. The ITransformerLikeTIn, TOut is executed by an actor and therefore you do not have to add any additional thread safety or memory visibility constructs to access the state from the callback methods.
Public interfaceISyncDirective
TBD
Public interfaceITerminationDirective
TBD
Public interfaceIUpstreamDirective
TBD
Delegates