Search Results for

    Show / Hide Table of Contents

    Class AbstractStage<TIn, TOut, TPushDirective, TPullDirective, TContext>

    TBD

    Inheritance
    object
    AbstractStage<TIn, TOut>
    AbstractStage<TIn, TOut, TPushDirective, TPullDirective, TContext>
    DetachedStage<TIn, TOut>
    PushPullStage<TIn, TOut>
    Implements
    IStage<TIn, TOut>
    Inherited Members
    AbstractStage<TIn, TOut>.IsDetached
    AbstractStage<TIn, TOut>.PreStart(ILifecycleContext)
    AbstractStage<TIn, TOut>.OnPush(TIn, IContext)
    AbstractStage<TIn, TOut>.OnPull(IContext)
    AbstractStage<TIn, TOut>.OnUpstreamFinish(IContext)
    AbstractStage<TIn, TOut>.OnDownstreamFinish(IContext, Exception)
    AbstractStage<TIn, TOut>.OnUpstreamFailure(Exception, IContext)
    AbstractStage<TIn, TOut>.PostStop()
    AbstractStage<TIn, TOut>.Decide(Exception)
    AbstractStage<TIn, TOut>.Restart()
    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
    [Obsolete("Please use GraphStage instead. [1.1.2]")]
    public abstract class AbstractStage<TIn, TOut, TPushDirective, TPullDirective, TContext> : AbstractStage<TIn, TOut>, IStage<TIn, TOut> where TPushDirective : IDirective where TPullDirective : IDirective where TContext : IContext
    Type Parameters
    Name Description
    TIn

    TBD

    TOut

    TBD

    TPushDirective

    TBD

    TPullDirective

    TBD

    TContext

    TBD

    Fields

    | Edit this page View Source

    Context

    TBD

    Declaration
    protected TContext Context
    Field Value
    Type Description
    TContext

    Methods

    | Edit this page View Source

    OnDownstreamFinish(IContext, Exception)

    This method is called when downstream has cancelled. By default the cancel signal is immediately propagated with StatefulStage.Finish.

    Declaration
    public override sealed ITerminationDirective OnDownstreamFinish(IContext context, Exception cause)
    Parameters
    Type Name Description
    IContext context

    TBD

    Exception cause
    Returns
    Type Description
    ITerminationDirective

    TBD

    Overrides
    AbstractStage<TIn, TOut>.OnDownstreamFinish(IContext, Exception)
    | Edit this page View Source

    OnDownstreamFinish(TContext, Exception)

    This method is called when downstream has cancelled. By default the cancel signal is immediately propagated with StatefulStage.Finish.

    Declaration
    public virtual ITerminationDirective OnDownstreamFinish(TContext context, Exception cause)
    Parameters
    Type Name Description
    TContext context

    TBD

    Exception cause
    Returns
    Type Description
    ITerminationDirective

    TBD

    | Edit this page View Source

    OnPull(IContext)

    This method is called when there is demand from downstream, i.e. you are allowed to push one element downstreams with Push(object), or request elements from upstreams with Pull()

    Declaration
    public override IDirective OnPull(IContext context)
    Parameters
    Type Name Description
    IContext context

    TBD

    Returns
    Type Description
    IDirective

    TBD

    Overrides
    AbstractStage<TIn, TOut>.OnPull(IContext)
    | Edit this page View Source

    OnPull(TContext)

    This method is called when there is demand from downstream, i.e. you are allowed to push one element downstreams with Push(object), or request elements from upstreams with Pull()

    Declaration
    public abstract TPullDirective OnPull(TContext context)
    Parameters
    Type Name Description
    TContext context

    TBD

    Returns
    Type Description
    TPullDirective

    TBD

    | Edit this page View Source

    OnPush(TIn, IContext)

    This method is called when an element from upstream is available and there is demand from downstream, i.e. in OnPush(TIn, TContext) you are allowed to call Push(object) to emit one element downstreams, or you can absorb the element by calling Pull(). Note that you can only emit zero or one element downstream from OnPull(TContext).

    To emit more than one element you have to push the remaining elements from OnPull(TContext), one-by-one. OnPush(TIn, TContext) is not called again until OnPull(TContext) has requested more elements with Pull().

    Declaration
    public override sealed IDirective OnPush(TIn element, IContext context)
    Parameters
    Type Name Description
    TIn element

    TBD

    IContext context

    TBD

    Returns
    Type Description
    IDirective

    TBD

    Overrides
    AbstractStage<TIn, TOut>.OnPush(TIn, IContext)
    | Edit this page View Source

    OnPush(TIn, TContext)

    This method is called when an element from upstream is available and there is demand from downstream, i.e. in OnPush(TIn, TContext) you are allowed to call Push(object) to emit one element downstreams, or you can absorb the element by calling Pull(). Note that you can only emit zero or one element downstream from OnPull(TContext).

    To emit more than one element you have to push the remaining elements from OnPull(TContext), one-by-one. OnPush(TIn, TContext) is not called again until OnPull(TContext) has requested more elements with Pull().

    Declaration
    public abstract TPushDirective OnPush(TIn element, TContext context)
    Parameters
    Type Name Description
    TIn element

    TBD

    TContext context

    TBD

    Returns
    Type Description
    TPushDirective

    TBD

    | Edit this page View Source

    OnUpstreamFailure(Exception, IContext)

    OnUpstreamFailure(Exception, IContext) is called when upstream has signaled that the stream is completed with failure. It is not called if OnPull(TContext) or OnPush(TIn, TContext) of the stage itself throws an exception.

    Note that elements that were emitted by upstream before the failure happened might not have been received by this stage when OnUpstreamFailure(Exception, IContext) is called, i.e. failures are not backpressured and might be propagated as soon as possible.

    Here you cannot call Push(object), because there might not be any demand from downstream. To emit additional elements before terminating you can use AbsorbTermination() and push final elements from OnPull(TContext). The stage will then be in finishing state, which can be checked with IsFinishing.

    Declaration
    public override sealed ITerminationDirective OnUpstreamFailure(Exception cause, IContext context)
    Parameters
    Type Name Description
    Exception cause

    TBD

    IContext context

    TBD

    Returns
    Type Description
    ITerminationDirective

    TBD

    Overrides
    AbstractStage<TIn, TOut>.OnUpstreamFailure(Exception, IContext)
    | Edit this page View Source

    OnUpstreamFailure(Exception, TContext)

    OnUpstreamFailure(Exception, IContext) is called when upstream has signaled that the stream is completed with failure. It is not called if OnPull(TContext) or OnPush(TIn, TContext) of the stage itself throws an exception.

    Note that elements that were emitted by upstream before the failure happened might not have been received by this stage when OnUpstreamFailure(Exception, IContext) is called, i.e. failures are not backpressured and might be propagated as soon as possible.

    Here you cannot call Push(object), because there might not be any demand from downstream. To emit additional elements before terminating you can use AbsorbTermination() and push final elements from OnPull(TContext). The stage will then be in finishing state, which can be checked with IsFinishing.

    Declaration
    public virtual ITerminationDirective OnUpstreamFailure(Exception cause, TContext context)
    Parameters
    Type Name Description
    Exception cause

    TBD

    TContext context

    TBD

    Returns
    Type Description
    ITerminationDirective

    TBD

    | Edit this page View Source

    OnUpstreamFinish(IContext)

    This method is called when upstream has signaled that the stream is successfully completed. Here you cannot call Push(object), because there might not be any demand from downstream. To emit additional elements before terminating you can use AbsorbTermination() and push final elements from OnPull(TContext). The stage will then be in finishing state, which can be checked with IsFinishing.

    By default the finish signal is immediately propagated with StatefulStage.Finish.

    IMPORTANT NOTICE: this signal is not back-pressured, it might arrive from upstream even though the last action by this stage was a "push".

    Declaration
    public override sealed ITerminationDirective OnUpstreamFinish(IContext context)
    Parameters
    Type Name Description
    IContext context

    TBD

    Returns
    Type Description
    ITerminationDirective

    TBD

    Overrides
    AbstractStage<TIn, TOut>.OnUpstreamFinish(IContext)
    | Edit this page View Source

    OnUpstreamFinish(TContext)

    This method is called when upstream has signaled that the stream is successfully completed. Here you cannot call Push(object), because there might not be any demand from downstream. To emit additional elements before terminating you can use AbsorbTermination() and push final elements from OnPull(TContext). The stage will then be in finishing state, which can be checked with IsFinishing.

    By default the finish signal is immediately propagated with StatefulStage.Finish.

    IMPORTANT NOTICE: this signal is not back-pressured, it might arrive from upstream even though the last action by this stage was a "push".

    Declaration
    public virtual ITerminationDirective OnUpstreamFinish(TContext context)
    Parameters
    Type Name Description
    TContext context

    TBD

    Returns
    Type Description
    ITerminationDirective

    TBD

    Implements

    IStage<TIn, TOut>

    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