Class Sample<T>
Supports sampling on stream
Implements
Inherited Members
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 SourceSample(Func<int>)
Declaration
public Sample(Func<int> next)
Parameters
Type | Name | Description |
---|---|---|
Func<int> | next | a lambda returns next sample position |
Sample(int)
Returns every nth
element
Declaration
public Sample(int nth)
Parameters
Type | Name | Description |
---|---|---|
int | nth |
|
Properties
| Edit this page View SourceIn
Declaration
public Inlet<T> In { get; }
Property Value
Type | Description |
---|---|
Inlet<T> |
Out
Declaration
public Outlet<T> Out { get; }
Property Value
Type | Description |
---|---|
Outlet<T> |
Shape
TBD
Declaration
public override FlowShape<T, T> Shape { get; }
Property Value
Type | Description |
---|---|
FlowShape<T, T> |
Overrides
Methods
| Edit this page View SourceCreateLogic(Attributes)
TBD
Declaration
protected override GraphStageLogic CreateLogic(Attributes inheritedAttributes)
Parameters
Type | Name | Description |
---|---|---|
Attributes | inheritedAttributes | TBD |
Returns
Type | Description |
---|---|
GraphStageLogic | TBD |
Overrides
| Edit this page View SourceRandom(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 |
Returns
Type | Description |
---|---|
Sample<T> |