Class MergeSortedTransform<TInputOutput>
A dataflow worker that merges multiple presorted inputs of the same type into a single sorted output. Any duplicates are preserved.
Note: Use the factory methods in MergeSortedTransformFactory to create instances of this class.
Note: To concatenate the input rows, i.e. to exhaust each input fully before forwarding any rows from other inputs, in a predefined order, ensure that the sort key range for each input does not overlap with the sort key range for any other input, and that the sort key values matches your desired input port row order. One simple option is to add a constant integer property to each input row type, and use that as the sort key.
TInputOutput
must implement IComparable<T>, and
the default comparer will be used.
Note that the inputs provide Full buffering of incoming data, and the worker is partially blocking, which potentially can consume a large amount of memory. This is required to avoid potential deadlocks. See BufferingMode for further details.
Note that input ports can be added after the worker is created (but before it or its siblings have started) by repeatedly calling Create<TInput>(String, OutputPortBase<TInput>). This can be particularly useful when generating workers in a loop.
Implements
Inherited Members
Namespace: actionETL
Assembly: actionETL.dll
Syntax
public class MergeSortedTransform<TInputOutput> : WorkerBase<MergeSortedTransform<TInputOutput>>, IDisposeOnFinished where TInputOutput : class
Type Parameters
Name | Description |
---|---|
TInputOutput | The type of each incoming and |
Properties
Output
Gets the output port for sending rows to the downstream worker.
Declaration
public OutputPort<TInputOutput> Output { get; }
Property Value
Type | Description |
---|---|
OutputPort<TInputOutput> |
TypedInputs
Gets the typed input ports.
Declaration
public InputPortCollection<TInputOutput> TypedInputs { get; }
Property Value
Type | Description |
---|---|
InputPortCollection<TInputOutput> |
Methods
RunAsync()
This method can be overridden to add custom functionality to the derived worker that runs before
and after the main processing. In this case, the base class base.RunAsync()
must
be called for the worker to function correctly.
Typically, this worker is used without overriding this method.
Declaration
protected override async Task<OutcomeStatus> RunAsync()
Returns
Type | Description |
---|---|
Task<OutcomeStatus> | A |