Class ErrorOutputPortCollection
A collection of all error output ports for a worker, always available as ErrorOutputs.
This class is used when you either don't need to know the row type of each port, or you cast the port(s) to have the actual row type (using an explicit cast or ToArray<TErrorOutput>()).
Note that workers with ports typically add additional members that allow access to typed versions of the ports.
Implements
Inherited Members
Namespace: actionETL
Assembly: actionETL.dll
Syntax
public sealed class ErrorOutputPortCollection : OutputPortBaseCollection, IReadOnlyList<OutputPortBase>, IReadOnlyCollection<OutputPortBase>, IEnumerable<OutputPortBase>, IEnumerable
Properties
TotalRowsReceived
Gets the total number of rows received across all error ports in this collection.
Note that this aggregates RowsReceived, i.e. all rows that were received by the error output ports, even if they were not necessarily sent to the downstream worker. Also see TotalRowsSent and AggregateErrorOutputRows.
Note that this property is only thread-safe after all the ports have completed.
Declaration
public long TotalRowsReceived { get; }
Property Value
| Type | Description |
|---|---|
| Int64 |
Methods
Create<TError>(String)
Creates and adds an error output port to the collection.
Note that this method is not thread-safe, only one thread at a time can add ports. This is normally the worker itself in its constructor, or its parent directly after having created the worker.
Note: This method is thread-safe.
Declaration
public ErrorOutputPort<TError> Create<TError>(string errorOutputPortName)
where TError : class
Parameters
| Type | Name | Description |
|---|---|---|
| String | errorOutputPortName | Name of the error output port. Must be unique among the error output ports on this worker. |
Returns
| Type | Description |
|---|---|
| ErrorOutputPort<TError> | The created error output port, which is often used to assign a typed error output port member, e.g. "ErrorOutput". |
Type Parameters
| Name | Description |
|---|---|
| TError | The row type. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException |
|
| InvalidOperationException | Cannot add port after the worker parent has started running its children. |
ToArray<TErrorOutput>()
Returns the error output ports copied to a new array, with the ports cast to the generic error output port type including row type. This is useful for workers where all error output ports are of the same type.
The caller can manipulate the array without affecting the worker, e.g. reordering the array items.
Note: This method is thread-safe.
Declaration
public ErrorOutputPort<TErrorOutput>[] ToArray<TErrorOutput>()
where TErrorOutput : class
Returns
| Type | Description |
|---|---|
| ErrorOutputPort<TErrorOutput>[] |
Type Parameters
| Name | Description |
|---|---|
| TErrorOutput | The row type. |
Exceptions
| Type | Condition |
|---|---|
| InvalidCastException | An element in the sequence cannot be cast to the specified type. |