Interface IDataStreamerReceiver<TItem, TArg, TResult>
Data streamer receiver.
public interface IDataStreamerReceiver<TItem, TArg, TResult>
Type Parameters
TItem
Payload item type.
TArg
Argument type.
TResult
Result type.
Properties
ArgumentMarshaller
Gets the custom marshaller for the receiver input argument.
IMarshaller<TArg>? ArgumentMarshaller { get; }
Property Value
- IMarshaller<TArg>
PayloadMarshaller
Gets the custom marshaller for the receiver payload.
IMarshaller<TItem>? PayloadMarshaller { get; }
Property Value
- IMarshaller<TItem>
ResultMarshaller
Gets the custom marshaller for the receiver result.
IMarshaller<TResult>? ResultMarshaller { get; }
Property Value
- IMarshaller<TResult>
Methods
ReceiveAsync(IList<TItem>, TArg, IDataStreamerReceiverContext, CancellationToken)
Receives a page of items from the data streamer.
The receiver is called for each page (batch) in the data streamer and is responsible for processing the items, updating zero or more tables, and returning a result.ValueTask<IList<TResult>?> ReceiveAsync(IList<TItem> page, TArg arg, IDataStreamerReceiverContext context, CancellationToken cancellationToken)
Parameters
page
IList<TItem>A page of items. Page size is controlled by PageSize.
arg
TArgReceiver argument.
context
IDataStreamerReceiverContextContext.
cancellationToken
CancellationTokenCancellation token.