Search Results for

    Show / Hide Table of Contents

    Class DetachedStage<TIn, TOut>

    DetachedStage can be used to implement operations similar to Buffer<TIn, TOut, TMat>(Flow<TIn, TOut, TMat>, int, OverflowStrategy), Expand<TIn, TOut1, TOut2, TMat>(Flow<TIn, TOut1, TMat>, Func<TOut1, IEnumerator<TOut2>>) and Conflate<TIn, TOut, TMat>(Flow<TIn, TOut, TMat>, Func<TOut, 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 PushPullStage<TIn, TOut>

    Inheritance
    object
    AbstractStage<TIn, TOut>
    AbstractStage<TIn, TOut, IUpstreamDirective, IDownstreamDirective, IDetachedContext<TOut>>
    DetachedStage<TIn, TOut>
    Implements
    IStage<TIn, TOut>
    Inherited Members
    AbstractStage<TIn, TOut, IUpstreamDirective, IDownstreamDirective, IDetachedContext<TOut>>.Context
    AbstractStage<TIn, TOut, IUpstreamDirective, IDownstreamDirective, IDetachedContext<TOut>>.OnPush(TIn, IDetachedContext<TOut>)
    AbstractStage<TIn, TOut, IUpstreamDirective, IDownstreamDirective, IDetachedContext<TOut>>.OnPush(TIn, IContext)
    AbstractStage<TIn, TOut, IUpstreamDirective, IDownstreamDirective, IDetachedContext<TOut>>.OnPull(IDetachedContext<TOut>)
    AbstractStage<TIn, TOut, IUpstreamDirective, IDownstreamDirective, IDetachedContext<TOut>>.OnPull(IContext)
    AbstractStage<TIn, TOut, IUpstreamDirective, IDownstreamDirective, IDetachedContext<TOut>>.OnUpstreamFinish(IContext)
    AbstractStage<TIn, TOut, IUpstreamDirective, IDownstreamDirective, IDetachedContext<TOut>>.OnUpstreamFinish(IDetachedContext<TOut>)
    AbstractStage<TIn, TOut, IUpstreamDirective, IDownstreamDirective, IDetachedContext<TOut>>.OnDownstreamFinish(IContext, Exception)
    AbstractStage<TIn, TOut, IUpstreamDirective, IDownstreamDirective, IDetachedContext<TOut>>.OnDownstreamFinish(IDetachedContext<TOut>, Exception)
    AbstractStage<TIn, TOut, IUpstreamDirective, IDownstreamDirective, IDetachedContext<TOut>>.OnUpstreamFailure(Exception, IContext)
    AbstractStage<TIn, TOut, IUpstreamDirective, IDownstreamDirective, IDetachedContext<TOut>>.OnUpstreamFailure(Exception, IDetachedContext<TOut>)
    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.0]")]
    public abstract class DetachedStage<TIn, TOut> : AbstractStage<TIn, TOut, IUpstreamDirective, IDownstreamDirective, IDetachedContext<TOut>>, IStage<TIn, TOut>
    Type Parameters
    Name Description
    TIn

    TBD

    TOut

    TBD

    Properties

    | Edit this page View Source

    IsDetached

    TBD

    Declaration
    protected override bool IsDetached { get; }
    Property Value
    Type Description
    bool
    Overrides
    AbstractStage<TIn, TOut>.IsDetached

    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