Search Results for

    Show / Hide Table of Contents

    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(bool) 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
    object
    GraphStageLogic
    InAndOutGraphStageLogic
    InGraphStageLogic
    OutGraphStageLogic
    TimerGraphStageLogic
    Implements
    IStageLogging
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.Streams.Stage
    Assembly: Akka.Streams.dll
    Syntax
    public abstract class GraphStageLogic : IStageLogging

    Constructors

    | Edit this page View Source

    GraphStageLogic(Shape)

    TBD

    Declaration
    protected GraphStageLogic(Shape shape)
    Parameters
    Type Name Description
    Shape shape

    TBD

    | Edit this page View Source

    GraphStageLogic(int, int)

    TBD

    Declaration
    protected GraphStageLogic(int inCount, int outCount)
    Parameters
    Type Name Description
    int inCount

    TBD

    int outCount

    TBD

    Fields

    | Edit this page View Source

    DoNothing

    Empty cached delegate

    Declaration
    public static readonly Action DoNothing
    Field Value
    Type Description
    Action
    | Edit this page View Source

    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
    | Edit this page View Source

    EagerTerminateOutput

    Output handler that terminates the stage upon cancellation.

    Declaration
    public static readonly OutHandler EagerTerminateOutput
    Field Value
    Type Description
    OutHandler
    | Edit this page View Source

    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
    | Edit this page View Source

    IgnoreTerminateOutput

    Output handler that does not terminate the stage upon cancellation.

    Declaration
    public static readonly OutHandler IgnoreTerminateOutput
    Field Value
    Type Description
    OutHandler
    | Edit this page View Source

    InCount

    TBD

    Declaration
    public readonly int InCount
    Field Value
    Type Description
    int
    | Edit this page View Source

    NoPromise

    Declaration
    public static readonly TaskCompletionSource<Done> NoPromise
    Field Value
    Type Description
    TaskCompletionSource<Done>
    | Edit this page View Source

    OutCount

    TBD

    Declaration
    public readonly int OutCount
    Field Value
    Type Description
    int
    | Edit this page View Source

    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

    | Edit this page View Source

    KeepGoingAfterAllPortsClosed

    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
    bool
    | Edit this page View Source

    Log

    Declaration
    public ILoggingAdapter Log { get; }
    Property Value
    Type Description
    ILoggingAdapter
    | Edit this page View Source

    LogSource

    Override to customise reported log source

    Declaration
    protected virtual object LogSource { get; }
    Property Value
    Type Description
    object
    | Edit this page View Source

    Materializer

    The IMaterializer that has set this GraphStage in motion.

    Declaration
    protected IMaterializer Materializer { get; }
    Property Value
    Type Description
    IMaterializer
    | Edit this page View Source

    StageActor

    TBD

    Declaration
    public StageActor StageActor { get; }
    Property Value
    Type Description
    StageActor
    | Edit this page View Source

    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(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
    | Edit this page View Source

    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

    | Edit this page View Source

    AbortEmitting<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

    | Edit this page View Source

    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

    | Edit this page View Source

    AfterPostStop()

    Declaration
    protected virtual void AfterPostStop()
    | Edit this page View Source

    BeforePreStart()

    Declaration
    protected virtual void BeforePreStart()
    | Edit this page View Source

    CancelStage(Exception)

    Declaration
    public void CancelStage(Exception cause)
    Parameters
    Type Name Description
    Exception cause
    | Edit this page View Source

    Cancel<T>(Inlet<T>)

    Declaration
    protected void Cancel<T>(Inlet<T> inlet)
    Parameters
    Type Name Description
    Inlet<T> inlet
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    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
    | Edit this page View Source

    CompleteStage()

    Automatically invokes Cancel<T>(Inlet<T>, Exception) or Complete(Outlet) on all the input or output ports that have been called, then marks the stage as stopped.

    Declaration
    public void CompleteStage()
    | Edit this page View Source

    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
    | Edit this page View Source

    ConditionalTerminateInput(Func<bool>)

    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<bool> predicate

    TBD

    Returns
    Type Description
    InHandler

    TBD

    | Edit this page View Source

    ConditionalTerminateOutput(Func<bool>)

    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<bool> predicate

    TBD

    Returns
    Type Description
    OutHandler

    TBD

    | Edit this page View Source

    CreateSubSinkInlet<T>(string)

    Declaration
    protected GraphStageLogic.SubSinkInlet<T> CreateSubSinkInlet<T>(string name)
    Parameters
    Type Name Description
    string name
    Returns
    Type Description
    GraphStageLogic.SubSinkInlet<T>
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    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

    | Edit this page View Source

    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

    | Edit this page View Source

    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

    | Edit this page View Source

    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

    | Edit this page View Source

    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 re-installs 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

    | Edit this page View Source

    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 re-installs 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

    | Edit this page View Source

    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

    | Edit this page View Source

    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
    | Edit this page View Source

    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
    Returns
    Type Description
    Action
    | Edit this page View Source

    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.

    In case the stream is not yet materialized, the callback will buffer events until the stream is available.

    InvokeWithFeedback(T) has an internal TaskCompletionSource<TResult> that will be failed if the event cannot be processed due to stream completion.

    To be thread safe this method must only be called from either the constructor of the graph operator during materialization or one of the methods invoked by the graph operator machinery, such as OnPush and OnPull.

    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
    Returns
    Type Description
    Action<T>
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    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
    | Edit this page View Source

    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
    | Edit this page View Source

    GetStageActor(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

    | Edit this page View Source

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

    In case the stream is not yet materialized, the callback will buffer events until the stream is available.

    InvokeWithFeedback(T) has an internal TaskCompletionSource<TResult> that will be failed if the event cannot be processed due to stream completion.

    To be thread safe this method must only be called from either the constructor of the graph operator during materialization or one of the methods invoked by the graph operator machinery, such as OnPush and OnPull.

    This object can be cached and reused within the same GraphStageLogic.

    Declaration
    protected IAsyncCallback<T> GetTypedAsyncCallback<T>(Action<T> handler)
    Parameters
    Type Name Description
    Action<T> handler
    Returns
    Type Description
    IAsyncCallback<T>
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    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 IsAvailable(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

    | Edit this page View Source

    HasBeenPulled<T>(Inlet<T>)

    Indicates whether there is already a pending pull for the given input port. If this method returns true then IsAvailable(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
    bool

    TBD

    Type Parameters
    Name Description
    T
    | Edit this page View Source

    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 HasBeenPulled(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
    bool

    TBD

    Type Parameters
    Name Description
    T
    | Edit this page View Source

    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
    bool

    TBD

    Type Parameters
    Name Description
    T
    | Edit this page View Source

    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
    bool

    TBD

    Type Parameters
    Name Description
    T
    | Edit this page View Source

    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
    bool

    TBD

    Type Parameters
    Name Description
    T
    | Edit this page View Source

    PassAlong<TOut, TIn>(Inlet<TIn>, Outlet<TOut>, bool, bool, bool)

    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

    bool doFinish

    TBD

    bool doFail

    TBD

    bool doPull

    TBD

    Type Parameters
    Name Description
    TOut

    TBD

    TIn

    TBD

    | Edit this page View Source

    PostStop()

    Invoked after processing of external events stopped because the stage is about to stop or fail.

    Declaration
    public virtual void PostStop()
    | Edit this page View Source

    PreStart()

    Invoked before any external events are processed, at the startup of the stage.

    Declaration
    public virtual void PreStart()
    | Edit this page View Source

    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 HasBeenPulled(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

    | Edit this page View Source

    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 IsAvailable(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 outlet is closed or already pulled.

    | Edit this page View Source

    ReadMany<T>(Inlet<T>, int, 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

    int 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 n is less than zero.

    IllegalStateException

    This exception is thrown when the specified inlet is currently reading.

    | Edit this page View Source

    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 inlet is currently reading.

    | Edit this page View Source

    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
    | Edit this page View Source

    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 onPush is undefined.

    | Edit this page View Source

    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
    | Edit this page View Source

    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 onPull is undefined.

    | Edit this page View Source

    SetHandler<TIn, TOut>(Inlet<TIn>, Outlet<TOut>, InAndOutGraphStageLogic)

    Assigns callbacks for the events for an Inlet<T> and Outlet<T>.

    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
    | Edit this page View Source

    SetHandlers<TIn, TOut>(Inlet<TIn>, Outlet<TOut>, InAndOutGraphStageLogic)

    Assigns callbacks for the events for an Inlet<T> and Outlet<T>.

    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
    | Edit this page View Source

    SetKeepGoing(bool)

    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
    bool enabled

    TBD

    | Edit this page View Source

    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 HasBeenPulled(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

    Implements

    IStageLogging

    Extension Methods

    ObjectExtensions.IsDefaultForType<T>(T)
    ObjectExtensions.AsOption<T>(T)
    Extensions.AsInstanceOf<T>(object)
    In this article
    • githubEdit this page
    • View Source
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET