Class Sample<T>
Supports sampling on stream
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
|
Improve this Doc
View Source
Sample(Func<Int32>)
Declaration
public Sample(Func<int> next)
Parameters
Type |
Name |
Description |
Func<Int32> |
next |
a lambda returns next sample position
|
|
Improve this Doc
View Source
Sample(Int32)
Returns every nth
element
Declaration
Parameters
Type |
Name |
Description |
Int32 |
nth |
nth element. nth must > 0
|
Properties
|
Improve this Doc
View Source
In
Declaration
public Inlet<T> In { get; }
Property Value
Type |
Description |
Inlet<T> |
|
|
Improve this Doc
View Source
Out
Declaration
public Outlet<T> Out { get; }
Property Value
|
Improve this Doc
View Source
Shape
Declaration
public override FlowShape<T, T> Shape { get; }
Property Value
Overrides
Akka.Streams.Stage.GraphStageWithMaterializedValue<Akka.Streams.FlowShape<T, T>, Akka.NotUsed>.Shape
Methods
|
Improve this Doc
View Source
CreateLogic(Attributes)
Declaration
protected override GraphStageLogic CreateLogic(Attributes inheritedAttributes)
Parameters
Type |
Name |
Description |
Attributes |
inheritedAttributes |
|
Returns
Overrides
Akka.Streams.Stage.GraphStage<Akka.Streams.FlowShape<T, T>>.CreateLogic(Akka.Streams.Attributes)
|
Improve this Doc
View Source
Random(Int32)
Randomly sampling on a stream
Declaration
public static Sample<T> Random(int maxStep = 1000)
Parameters
Type |
Name |
Description |
Int32 |
maxStep |
must > 0, default 1000, the randomly step will be between 1 (inclusive) and maxStep (inclusive)
|
Returns
Implements
Extension Methods