Search Results for

    Show / Hide Table of Contents

    Class Sample<T>

    Supports sampling on stream

    Inheritance
    object
    GraphStageWithMaterializedValue<FlowShape<T, T>, NotUsed>
    GraphStage<FlowShape<T, T>>
    Sample<T>
    Implements
    IGraphStageWithMaterializedValue<FlowShape<T, T>, NotUsed>
    IGraph<FlowShape<T, T>, NotUsed>
    IGraph<FlowShape<T, T>>
    Inherited Members
    GraphStage<FlowShape<T, T>>.CreateLogicAndMaterializedValue(Attributes)
    GraphStage<FlowShape<T, T>>.CreateLogic(Attributes)
    GraphStageWithMaterializedValue<FlowShape<T, T>, NotUsed>.InitialAttributes
    GraphStageWithMaterializedValue<FlowShape<T, T>, NotUsed>.Shape
    GraphStageWithMaterializedValue<FlowShape<T, T>, NotUsed>.WithAttributes(Attributes)
    GraphStageWithMaterializedValue<FlowShape<T, T>, NotUsed>.CreateLogicAndMaterializedValue(Attributes)
    GraphStageWithMaterializedValue<FlowShape<T, T>, NotUsed>.Module
    GraphStageWithMaterializedValue<FlowShape<T, T>, NotUsed>.AddAttributes(Attributes)
    GraphStageWithMaterializedValue<FlowShape<T, T>, NotUsed>.Named(string)
    GraphStageWithMaterializedValue<FlowShape<T, T>, NotUsed>.Async()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.Streams.Dsl
    Assembly: Akka.Streams.dll
    Syntax
    public class Sample<T> : GraphStage<FlowShape<T, T>>, IGraphStageWithMaterializedValue<FlowShape<T, T>, NotUsed>, IGraph<FlowShape<T, T>, NotUsed>, IGraph<FlowShape<T, T>>
    Type Parameters
    Name Description
    T

    input and output type

    Constructors

    | Edit this page View Source

    Sample(Func<int>)

    Declaration
    public Sample(Func<int> next)
    Parameters
    Type Name Description
    Func<int> next

    a lambda returns next sample position

    | Edit this page View Source

    Sample(int)

    Returns every nth element

    Declaration
    public Sample(int nth)
    Parameters
    Type Name Description
    int nth

    nth element. nth must > 0

    Properties

    | Edit this page View Source

    In

    Declaration
    public Inlet<T> In { get; }
    Property Value
    Type Description
    Inlet<T>
    | Edit this page View Source

    Out

    Declaration
    public Outlet<T> Out { get; }
    Property Value
    Type Description
    Outlet<T>
    | Edit this page View Source

    Shape

    TBD

    Declaration
    public override FlowShape<T, T> Shape { get; }
    Property Value
    Type Description
    FlowShape<T, T>
    Overrides
    GraphStageWithMaterializedValue<FlowShape<T, T>, NotUsed>.Shape

    Methods

    | Edit this page View Source

    CreateLogic(Attributes)

    TBD

    Declaration
    protected override GraphStageLogic CreateLogic(Attributes inheritedAttributes)
    Parameters
    Type Name Description
    Attributes inheritedAttributes

    TBD

    Returns
    Type Description
    GraphStageLogic

    TBD

    Overrides
    GraphStage<FlowShape<T, T>>.CreateLogic(Attributes)
    | Edit this page View Source

    Random(int)

    Randomly sampling on a stream

    Declaration
    public static Sample<T> Random(int maxStep = 1000)
    Parameters
    Type Name Description
    int maxStep

    must > 0, default 1000, the randomly step will be between 1 (inclusive) and maxStep (inclusive)

    Returns
    Type Description
    Sample<T>

    Implements

    IGraphStageWithMaterializedValue<TShape, TMaterialized>
    IGraph<TShape, TMaterialized>
    IGraph<TShape>

    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