Class GraphStageLogic
Represents the processing logic behind a GraphStage<TShape>. 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 GraphStage<TShape>
* 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 completed once all its input and output ports have been closed. This can be changed by setting SetKeepGoing(Boolean) to true.The PostStop() lifecycle hook on the logic itself is called once all ports are closed. This is the only tear down callback that is guaranteed to happen, if the actor system or the materializer is terminated the handlers may never see any callbacks to OnUpstreamFailure(Exception), OnUpstreamFinish() or OnDownstreamFinish(Exception). Therefore stage resource cleanup should always be done in PostStop().
Inheritance
Implements
Inherited Members
Namespace: Akka.Streams.Stage
Assembly: Akka.Streams.dll
Syntax
public abstract class GraphStageLogic : IStageLogging
Constructors
| Improve this Doc View SourceGraphStageLogic(Shape)
TBD
Declaration
protected GraphStageLogic(Shape shape)
Parameters
Type | Name | Description |
---|---|---|
Shape | shape | TBD |
GraphStageLogic(Int32, Int32)
TBD
Declaration
protected GraphStageLogic(int inCount, int outCount)
Parameters
Type | Name | Description |
---|---|---|
Int32 | inCount | TBD |
Int32 | outCount | TBD |
Fields
| Improve this Doc View SourceDoNothing
TBD
Declaration
public static Action DoNothing
Field Value
Type | Description |
---|---|
Action |
EagerTerminateInput
Input handler that terminates the stage upon receiving completion. The stage fails upon receiving a failure.
Declaration
public static readonly InHandler EagerTerminateInput
Field Value
Type | Description |
---|---|
InHandler |
EagerTerminateOutput
Output handler that terminates the stage upon cancellation.
Declaration
public static readonly OutHandler EagerTerminateOutput
Field Value
Type | Description |
---|---|
OutHandler |
IgnoreTerminateInput
Input handler that does not terminate the stage upon receiving completion. The stage fails upon receiving a failure.
Declaration
public static readonly InHandler IgnoreTerminateInput
Field Value
Type | Description |
---|---|
InHandler |
IgnoreTerminateOutput
Output handler that does not terminate the stage upon cancellation.
Declaration
public static readonly OutHandler IgnoreTerminateOutput
Field Value
Type | Description |
---|---|
OutHandler |
InCount
TBD
Declaration
public readonly int InCount
Field Value
Type | Description |
---|---|
Int32 |
OutCount
TBD
Declaration
public readonly int OutCount
Field Value
Type | Description |
---|---|
Int32 |
TotallyIgnorantInput
Input handler that does not terminate the stage upon receiving completion nor failure.
Declaration
public static readonly InHandler TotallyIgnorantInput
Field Value
Type | Description |
---|---|
InHandler |
Properties
| Improve this Doc View SourceKeepGoingAfterAllPortsClosed
If this method returns true when all ports had been closed then the stage is not stopped until CompleteStage() or FailStage(Exception) are explicitly called
Declaration
public virtual bool KeepGoingAfterAllPortsClosed { get; }
Property Value
Type | Description |
---|---|
Boolean |
Log
Declaration
public ILoggingAdapter Log { get; }
Property Value
Type | Description |
---|---|
ILoggingAdapter |
LogSource
Override to customise reported log source
Declaration
protected virtual object LogSource { get; }
Property Value
Type | Description |
---|---|
Object |
Materializer
The IMaterializer that has set this GraphStage in motion.
Declaration
protected IMaterializer Materializer { get; }
Property Value
Type | Description |
---|---|
IMaterializer |
StageActor
TBD
Declaration
public StageActor StageActor { get; }
Property Value
Type | Description |
---|---|
StageActor |
StageActorName
Override and return a name to be given to the StageActor of this stage.
This method will be only invoked and used once, during the first GetStageActor(StageActorRef.Receive)
invocation which creates the actor, since subsequent getStageActors
calls function
like become
, rather than creating new actors.
Returns an empty string by default, which means that the name will a unique generated String (e.g. "$$a").
Declaration
protected virtual string StageActorName { get; }
Property Value
Type | Description |
---|---|
String |
SubFusingMaterializer
An IMaterializer that may run fusable parts of the graphs that it materializes within the same actor as the current GraphStage(if fusing is available). This materializer must not be shared outside of the GraphStage.
Declaration
protected IMaterializer SubFusingMaterializer { get; }
Property Value
Type | Description |
---|---|
IMaterializer |
Methods
| Improve this Doc View SourceAbortEmitting<T>(Outlet<T>)
Abort outstanding (suspended) emissions for the given outlet, if there are any. This will reinstall the replaced handler that was in effect before the Emit<T>(Outlet<T>, T, Action) call.
Declaration
protected void AbortEmitting<T>(Outlet<T> outlet)
Parameters
Type | Name | Description |
---|---|---|
Outlet<T> | outlet | TBD |
Type Parameters
Name | Description |
---|---|
T | TBD |
AbortReading<T>(Inlet<T>)
Abort outstanding (suspended) reading for the given inlet, if there is any. This will reinstall the replaced handler that was in effect before the read call.
Declaration
protected void AbortReading<T>(Inlet<T> inlet)
Parameters
Type | Name | Description |
---|---|---|
Inlet<T> | inlet | TBD |
Type Parameters
Name | Description |
---|---|
T | TBD |
AfterPostStop()
TBD
Declaration
protected virtual void AfterPostStop()
BeforePreStart()
TBD
Declaration
protected virtual void BeforePreStart()
Cancel<T>(Inlet<T>)
Declaration
protected void Cancel<T>(Inlet<T> inlet)
Parameters
Type | Name | Description |
---|---|---|
Inlet<T> | inlet |
Type Parameters
Name | Description |
---|---|
T |
Cancel<T>(Inlet<T>, Exception)
Requests to stop receiving events from a given input port. Cancelling clears any ungrabbed elements from the port.
Declaration
protected void Cancel<T>(Inlet<T> inlet, Exception cause)
Parameters
Type | Name | Description |
---|---|---|
Inlet<T> | inlet | TBD |
Exception | cause |
Type Parameters
Name | Description |
---|---|
T |
CancelStage(Exception)
Declaration
public void CancelStage(Exception cause)
Parameters
Type | Name | Description |
---|---|---|
Exception | cause |
Complete<T>(Outlet<T>)
Signals that there will be no more elements emitted on the given port.
Declaration
protected void Complete<T>(Outlet<T> outlet)
Parameters
Type | Name | Description |
---|---|---|
Outlet<T> | outlet | TBD |
Type Parameters
Name | Description |
---|---|
T |
CompleteStage()
Automatically invokes Cancel<T>(Inlet<T>, Exception) or Akka.Streams.Stage.GraphStageLogic.Complete(Akka.Streams.Outlet) on all the input or output ports that have been called, then marks the stage as stopped.
Declaration
public void CompleteStage()
ConditionalTerminateInput(Func<Boolean>)
Input handler that terminates the state upon receiving completion if the given condition holds at that time. The stage fails upon receiving a failure.
Declaration
public static InHandler ConditionalTerminateInput(Func<bool> predicate)
Parameters
Type | Name | Description |
---|---|---|
Func<Boolean> | predicate | TBD |
Returns
Type | Description |
---|---|
InHandler | TBD |
ConditionalTerminateOutput(Func<Boolean>)
Output handler that terminates the state upon receiving completion if the given condition holds at that time. The stage fails upon receiving a failure.
Declaration
public static OutHandler ConditionalTerminateOutput(Func<bool> predicate)
Parameters
Type | Name | Description |
---|---|---|
Func<Boolean> | predicate | TBD |
Returns
Type | Description |
---|---|
OutHandler | TBD |
CreateSubSinkInlet<T>(String)
TBD
Declaration
protected GraphStageLogic.SubSinkInlet<T> CreateSubSinkInlet<T>(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name | TBD |
Returns
Type | Description |
---|---|
Akka.Streams.Stage.GraphStageLogic.SubSinkInlet<T> | TBD |
Type Parameters
Name | Description |
---|---|
T | TBD |
Emit<T>(Outlet<T>, T)
Emit an element through the given outlet and continue with the given thunk afterwards, suspending execution if necessary. This action replaces the OutHandler for the given outlet if suspension is needed and reinstalls the current handler upon receiving an OnPull().
Declaration
protected void Emit<T>(Outlet<T> outlet, T element)
Parameters
Type | Name | Description |
---|---|---|
Outlet<T> | outlet | TBD |
T | element | TBD |
Type Parameters
Name | Description |
---|---|
T | TBD |
Emit<T>(Outlet<T>, T, Action)
Emit an element through the given outlet and continue with the given thunk
afterwards, suspending execution if necessary.
This action replaces the OutHandler for the given outlet if suspension
is needed and reinstalls the current handler upon receiving an OnPull()
signal (before invoking the andThen
function).
Declaration
protected void Emit<T>(Outlet<T> outlet, T element, Action andThen)
Parameters
Type | Name | Description |
---|---|---|
Outlet<T> | outlet | TBD |
T | element | TBD |
Action | andThen | TBD |
Type Parameters
Name | Description |
---|---|
T | TBD |
EmitMultiple<T>(Outlet<T>, IEnumerable<T>)
Emit a sequence of elements through the given outlet, suspending execution if necessary. This action replaces the OutHandler for the given outlet if suspension is needed and reinstalls the current handler upon receiving an OnPull() signal.
Declaration
protected void EmitMultiple<T>(Outlet<T> outlet, IEnumerable<T> elements)
Parameters
Type | Name | Description |
---|---|---|
Outlet<T> | outlet | TBD |
IEnumerable<T> | elements | TBD |
Type Parameters
Name | Description |
---|---|
T | TBD |
EmitMultiple<T>(Outlet<T>, IEnumerable<T>, Action)
Emit a sequence of elements through the given outlet and continue with the given thunk
afterwards, suspending execution if necessary.
This action replaces the OutHandler for the given outlet if suspension
is needed and reinstalls the current handler upon receiving an OnPull()
signal (before invoking the andThen
function).
Declaration
protected void EmitMultiple<T>(Outlet<T> outlet, IEnumerable<T> elements, Action andThen)
Parameters
Type | Name | Description |
---|---|---|
Outlet<T> | outlet | TBD |
IEnumerable<T> | elements | TBD |
Action | andThen | TBD |
Type Parameters
Name | Description |
---|---|
T | TBD |
EmitMultiple<T>(Outlet<T>, IEnumerator<T>)
Emit a sequence of elements through the given outlet, suspending execution if necessary. This action replaces the OutHandler for the given outlet if suspension is needed and reinstalls the current handler upon receiving an OnPull() signal.
Declaration
protected void EmitMultiple<T>(Outlet<T> outlet, IEnumerator<T> enumerator)
Parameters
Type | Name | Description |
---|---|---|
Outlet<T> | outlet | TBD |
IEnumerator<T> | enumerator | TBD |
Type Parameters
Name | Description |
---|---|
T | TBD |
EmitMultiple<T>(Outlet<T>, IEnumerator<T>, Action)
Emit a sequence of elements through the given outlet and continue with the given thunk
afterwards, suspending execution if necessary.
This action replaces the OutHandler for the given outlet if suspension
is needed and reinstalls the current handler upon receiving an OnPull()
signal (before invoking the andThen
function).
Declaration
protected void EmitMultiple<T>(Outlet<T> outlet, IEnumerator<T> enumerator, Action andThen)
Parameters
Type | Name | Description |
---|---|---|
Outlet<T> | outlet | TBD |
IEnumerator<T> | enumerator | TBD |
Action | andThen | TBD |
Type Parameters
Name | Description |
---|---|
T | TBD |
Fail<T>(Outlet<T>, Exception)
Signals failure through the given port.
Declaration
protected void Fail<T>(Outlet<T> outlet, Exception reason)
Parameters
Type | Name | Description |
---|---|---|
Outlet<T> | outlet | TBD |
Exception | reason | TBD |
Type Parameters
Name | Description |
---|---|
T |
FailStage(Exception)
Automatically invokes Cancel<T>(Inlet<T>, Exception) or Fail<T>(Outlet<T>, Exception) on all the input or output ports that have been called, then marks the stage as stopped.
Declaration
public void FailStage(Exception reason)
Parameters
Type | Name | Description |
---|---|---|
Exception | reason | TBD |
GetAsyncCallback(Action)
Obtain a callback object that can be used asynchronously to re-enter the current GraphStage<TShape> with an asynchronous notification. The delegate returned is safe to be called from other threads and it will in the background thread-safely delegate to the passed callback function. I.e. it will be called by the external world and the passed handler will be invoked eventually in a thread-safe way by the execution environment.
This object can be cached and reused within the same GraphStageLogic.
Declaration
protected Action GetAsyncCallback(Action handler)
Parameters
Type | Name | Description |
---|---|---|
Action | handler | TBD |
Returns
Type | Description |
---|---|
Action | TBD |
GetAsyncCallback<T>(Action<T>)
Obtain a callback object that can be used asynchronously to re-enter the current GraphStage<TShape> with an asynchronous notification. The delegate returned is safe to be called from other threads and it will in the background thread-safely delegate to the passed callback function. I.e. it will be called by the external world and the passed handler will be invoked eventually in a thread-safe way by the execution environment.
This object can be cached and reused within the same GraphStageLogic.
Declaration
protected Action<T> GetAsyncCallback<T>(Action<T> handler)
Parameters
Type | Name | Description |
---|---|---|
Action<T> | handler | TBD |
Returns
Type | Description |
---|---|
Action<T> | TBD |
Type Parameters
Name | Description |
---|---|
T | TBD |
GetHandler<T>(Inlet<T>)
Retrieves the current callback for the events on the given Inlet<T>
Declaration
protected IInHandler GetHandler<T>(Inlet<T> inlet)
Parameters
Type | Name | Description |
---|---|---|
Inlet<T> | inlet | TBD |
Returns
Type | Description |
---|---|
IInHandler | TBD |
Type Parameters
Name | Description |
---|---|
T |
GetHandler<T>(Outlet<T>)
Retrieves the current callback for the events on the given Outlet<T>
Declaration
protected IOutHandler GetHandler<T>(Outlet<T> outlet)
Parameters
Type | Name | Description |
---|---|---|
Outlet<T> | outlet | TBD |
Returns
Type | Description |
---|---|
IOutHandler | TBD |
Type Parameters
Name | Description |
---|---|
T |
GetStageActor(StageActorRef.Receive)
Initialize a StageActorRef which can be used to interact with from the outside world "as-if" an actor. The messages are looped through the GetAsyncCallback<T>(Action<T>) mechanism of GraphStage<TShape> so they are safe to modify internal state of this stage.
This method must (the earliest) be called after the GraphStageLogic constructor has finished running, for example from the PreStart() callback the graph stage logic provides.
Created StageActorRef to get messages and watch other actors in synchronous way.
The StageActorRef's lifecycle is bound to the Stage, in other words when the Stage is finished, the Actor will be terminated as well. The entity backing the StageActorRef is not a real Actor, but the GraphStageLogic itself, therefore it does not react to PoisonPill.
Declaration
protected StageActor GetStageActor(StageActorRef.Receive receive)
Parameters
Type | Name | Description |
---|---|---|
StageActorRef.Receive | receive | Callback that will be called upon receiving of a message by this special Actor |
Returns
Type | Description |
---|---|
StageActor | Minimal actor with watch method |
Grab<T>(Inlet<T>)
Once the callback OnPush() for an input port has been invoked, the element that has been pushed can be retrieved via this method. After Grab<T>(Inlet<T>) has been called the port is considered to be empty, and further calls to Grab<T>(Inlet<T>) will fail until the port is pulled again and a new element is pushed as a response.
The method Akka.Streams.Stage.GraphStageLogic.IsAvailable(Akka.Streams.Inlet) can be used to query if the port has an element that can be grabbed or not.
Declaration
protected T Grab<T>(Inlet<T> inlet)
Parameters
Type | Name | Description |
---|---|---|
Inlet<T> | inlet | TBD |
Returns
Type | Description |
---|---|
T | TBD |
Type Parameters
Name | Description |
---|---|
T | TBD |
HasBeenPulled<T>(Inlet<T>)
Indicates whether there is already a pending pull for the given input port. If this method returns true then Akka.Streams.Stage.GraphStageLogic.IsAvailable(Akka.Streams.Inlet) must return false for that same port.
Declaration
protected bool HasBeenPulled<T>(Inlet<T> inlet)
Parameters
Type | Name | Description |
---|---|---|
Inlet<T> | inlet | TBD |
Returns
Type | Description |
---|---|
Boolean | TBD |
Type Parameters
Name | Description |
---|---|
T |
IsAvailable<T>(Inlet<T>)
Indicates whether there is an element waiting at the given input port. Grab<T>(Inlet<T>) can be used to retrieve the element. After calling Grab<T>(Inlet<T>) this method will return false.
If this method returns true then Akka.Streams.Stage.GraphStageLogic.HasBeenPulled(Akka.Streams.Inlet) will return false for that same port.
Declaration
protected bool IsAvailable<T>(Inlet<T> inlet)
Parameters
Type | Name | Description |
---|---|---|
Inlet<T> | inlet | TBD |
Returns
Type | Description |
---|---|
Boolean | TBD |
Type Parameters
Name | Description |
---|---|
T |
IsAvailable<T>(Outlet<T>)
Return true if the given output port is ready to be pushed.
Declaration
protected bool IsAvailable<T>(Outlet<T> outlet)
Parameters
Type | Name | Description |
---|---|---|
Outlet<T> | outlet | TBD |
Returns
Type | Description |
---|---|
Boolean | TBD |
Type Parameters
Name | Description |
---|---|
T |
IsClosed<T>(Inlet<T>)
Indicates whether the port has been closed. A closed port cannot be pulled.
Declaration
protected bool IsClosed<T>(Inlet<T> inlet)
Parameters
Type | Name | Description |
---|---|---|
Inlet<T> | inlet | TBD |
Returns
Type | Description |
---|---|
Boolean | TBD |
Type Parameters
Name | Description |
---|---|
T |
IsClosed<T>(Outlet<T>)
Indicates whether the port has been closed. A closed port cannot be pushed.
Declaration
protected bool IsClosed<T>(Outlet<T> outlet)
Parameters
Type | Name | Description |
---|---|---|
Outlet<T> | outlet | TBD |
Returns
Type | Description |
---|---|
Boolean | TBD |
Type Parameters
Name | Description |
---|---|
T |
PassAlong<TOut, TIn>(Inlet<TIn>, Outlet<TOut>, Boolean, Boolean, Boolean)
Install a handler on the given inlet that emits received elements on the
given outlet before pulling for more data. doFinish
and doFail
control whether
completion or failure of the given inlet shall lead to stage termination or not.
doPull
instructs to perform one initial pull on the from
port.
Declaration
protected void PassAlong<TOut, TIn>(Inlet<TIn> from, Outlet<TOut> to, bool doFinish = true, bool doFail = true, bool doPull = false)
where TIn : TOut
Parameters
Type | Name | Description |
---|---|---|
Inlet<TIn> | from | TBD |
Outlet<TOut> | to | TBD |
Boolean | doFinish | TBD |
Boolean | doFail | TBD |
Boolean | doPull | TBD |
Type Parameters
Name | Description |
---|---|
TOut | TBD |
TIn | TBD |
PostStop()
Invoked after processing of external events stopped because the stage is about to stop or fail.
Declaration
public virtual void PostStop()
PreStart()
Invoked before any external events are processed, at the startup of the stage.
Declaration
public virtual void PreStart()
Pull<T>(Inlet<T>)
Requests an element on the given port. Calling this method twice before an element arrived will fail. There can only be one outstanding request at any given time.The method Akka.Streams.Stage.GraphStageLogic.HasBeenPulled(Akka.Streams.Inlet) can be used query whether pull is allowed to be called or not.This method will also fail if the port is already closed.
Declaration
protected void Pull<T>(Inlet<T> inlet)
Parameters
Type | Name | Description |
---|---|---|
Inlet<T> | inlet | TBD |
Type Parameters
Name | Description |
---|---|
T | TBD |
Push<T>(Outlet<T>, T)
Emits an element through the given output port. Calling this method twice before a Pull<T>(Inlet<T>) has been arrived will fail. There can be only one outstanding push request at any given time. The method Akka.Streams.Stage.GraphStageLogic.IsAvailable(Akka.Streams.Inlet) can be used to check if the port is ready to be pushed or not.
Declaration
protected void Push<T>(Outlet<T> outlet, T element)
Parameters
Type | Name | Description |
---|---|---|
Outlet<T> | outlet | TBD |
T | element | TBD |
Type Parameters
Name | Description |
---|---|
T | TBD |
Exceptions
Type | Condition |
---|---|
ArgumentException | This exception is thrown when either the specified |
Read<T>(Inlet<T>, Action<T>, Action)
Read an element from the given inlet and continue with the given function,
suspending execution if necessary. This action replaces the InHandler
for the given inlet if suspension is needed and reinstalls the current
handler upon receiving the OnPush() signal (before invoking the andThen
function).
Declaration
protected void Read<T>(Inlet<T> inlet, Action<T> andThen, Action onClose)
Parameters
Type | Name | Description |
---|---|---|
Inlet<T> | inlet | TBD |
Action<T> | andThen | TBD |
Action | onClose | TBD |
Type Parameters
Name | Description |
---|---|
T | TBD |
Exceptions
Type | Condition |
---|---|
IllegalStateException | This exception is thrown when the specified |
ReadMany<T>(Inlet<T>, Int32, Action<IEnumerable<T>>, Action<IEnumerable<T>>)
Read a number of elements from the given inlet and continue with the given function, suspending execution if necessary. This action replaces the InHandler for the given inlet if suspension is needed and reinstalls the current handler upon receiving the last OnPush() signal.
If upstream closes before N elements have been read,
the onComplete
function is invoked with the elements which were read.
Declaration
protected void ReadMany<T>(Inlet<T> inlet, int n, Action<IEnumerable<T>> andThen, Action<IEnumerable<T>> onComplete)
Parameters
Type | Name | Description |
---|---|---|
Inlet<T> | inlet | TBD |
Int32 | n | TBD |
Action<IEnumerable<T>> | andThen | TBD |
Action<IEnumerable<T>> | onComplete | TBD |
Type Parameters
Name | Description |
---|---|
T | TBD |
Exceptions
Type | Condition |
---|---|
ArgumentException | This exception is thrown when the specified |
IllegalStateException | This exception is thrown when the specified |
SetHandler<T>(Inlet<T>, IInHandler)
Assigns callbacks for the events for an Inlet<T>.
Declaration
protected void SetHandler<T>(Inlet<T> inlet, IInHandler handler)
Parameters
Type | Name | Description |
---|---|---|
Inlet<T> | inlet | TBD |
IInHandler | handler | TBD |
Type Parameters
Name | Description |
---|---|
T |
SetHandler<T>(Inlet<T>, Action, Action, Action<Exception>)
Assigns callbacks for the events for an Outlet<T>.
Declaration
protected void SetHandler<T>(Inlet<T> inlet, Action onPush, Action onUpstreamFinish = null, Action<Exception> onUpstreamFailure = null)
Parameters
Type | Name | Description |
---|---|---|
Inlet<T> | inlet | TBD |
Action | onPush | TBD |
Action | onUpstreamFinish | TBD |
Action<Exception> | onUpstreamFailure | TBD |
Type Parameters
Name | Description |
---|---|
T |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | This exception is thrown when the specified |
SetHandler<T>(Outlet<T>, IOutHandler)
Assigns callbacks for the events for an Outlet<T>.
Declaration
protected void SetHandler<T>(Outlet<T> outlet, IOutHandler handler)
Parameters
Type | Name | Description |
---|---|---|
Outlet<T> | outlet | TBD |
IOutHandler | handler | TBD |
Type Parameters
Name | Description |
---|---|
T |
SetHandler<T>(Outlet<T>, Action, Action<Exception>)
Assigns callbacks for the events for an Outlet<T>.
Declaration
protected void SetHandler<T>(Outlet<T> outlet, Action onPull, Action<Exception> onDownstreamFinish = null)
Parameters
Type | Name | Description |
---|---|---|
Outlet<T> | outlet | TBD |
Action | onPull | TBD |
Action<Exception> | onDownstreamFinish | TBD |
Type Parameters
Name | Description |
---|---|
T |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | This exception is thrown when the specified |
SetHandler<TIn, TOut>(Inlet<TIn>, Outlet<TOut>, InAndOutGraphStageLogic)
Declaration
[Obsolete("Use method `SetHandlers` instead. Will be removed in v1.5")]
protected void SetHandler<TIn, TOut>(Inlet<TIn> inlet, Outlet<TOut> outlet, InAndOutGraphStageLogic handler)
Parameters
Type | Name | Description |
---|---|---|
Inlet<TIn> | inlet | |
Outlet<TOut> | outlet | |
InAndOutGraphStageLogic | handler |
Type Parameters
Name | Description |
---|---|
TIn | |
TOut |
SetHandlers<TIn, TOut>(Inlet<TIn>, Outlet<TOut>, InAndOutGraphStageLogic)
Declaration
protected void SetHandlers<TIn, TOut>(Inlet<TIn> inlet, Outlet<TOut> outlet, InAndOutGraphStageLogic handler)
Parameters
Type | Name | Description |
---|---|---|
Inlet<TIn> | inlet | |
Outlet<TOut> | outlet | |
InAndOutGraphStageLogic | handler |
Type Parameters
Name | Description |
---|---|
TIn | |
TOut |
SetKeepGoing(Boolean)
Controls whether this stage shall shut down when all its ports are closed, which is the default. In order to have it keep going past that point this method needs to be called with a true argument before all ports are closed, and afterwards it will not be closed until this method is called with a false argument or the stage is terminated via CompleteStage() or FailStage(Exception).
Declaration
protected void SetKeepGoing(bool enabled)
Parameters
Type | Name | Description |
---|---|---|
Boolean | enabled | TBD |
TryPull<T>(Inlet<T>)
Requests an element on the given port unless the port is already closed. Calling this method twice before an element arrived will fail. There can only be one outstanding request at any given time.The method Akka.Streams.Stage.GraphStageLogic.HasBeenPulled(Akka.Streams.Inlet) can be used query whether pull is allowed to be called or not.
Declaration
protected void TryPull<T>(Inlet<T> inlet)
Parameters
Type | Name | Description |
---|---|---|
Inlet<T> | inlet | TBD |
Type Parameters
Name | Description |
---|---|
T | TBD |