Table of Contents

Interface IDataStreamerTarget<T>

Namespace
Apache.Ignite.Table
Assembly
Apache.Ignite.dll

Represents an entity that can be used as a target for streaming data.

public interface IDataStreamerTarget<T>

Type Parameters

T

Data type.

Methods

StreamDataAsync(IAsyncEnumerable<DataStreamerItem<T>>, DataStreamerOptions?, CancellationToken)

Streams data into the underlying table.

Task StreamDataAsync(IAsyncEnumerable<DataStreamerItem<T>> data, DataStreamerOptions? options = null, CancellationToken cancellationToken = default)

Parameters

data IAsyncEnumerable<DataStreamerItem<T>>

Data.

options DataStreamerOptions

Streamer options.

cancellationToken CancellationToken

Cancellation token.

Returns

Task

A Task representing the asynchronous operation.

StreamDataAsync(IAsyncEnumerable<T>, DataStreamerOptions?, CancellationToken)

Streams data into the underlying table.

Task StreamDataAsync(IAsyncEnumerable<T> data, DataStreamerOptions? options = null, CancellationToken cancellationToken = default)

Parameters

data IAsyncEnumerable<T>

Data.

options DataStreamerOptions

Streamer options.

cancellationToken CancellationToken

Cancellation token.

Returns

Task

A Task representing the asynchronous operation.

StreamDataAsync<TSource, TPayload, TArg>(IAsyncEnumerable<TSource>, Func<TSource, T>, Func<TSource, TPayload>, ReceiverDescriptor<TArg>, TArg, DataStreamerOptions?, CancellationToken)

Streams data into the underlying table with a receiver, ignoring receiver results (if any).

Task StreamDataAsync<TSource, TPayload, TArg>(IAsyncEnumerable<TSource> data, Func<TSource, T> keySelector, Func<TSource, TPayload> payloadSelector, ReceiverDescriptor<TArg> receiver, TArg receiverArg, DataStreamerOptions? options = null, CancellationToken cancellationToken = default) where TPayload : notnull

Parameters

data IAsyncEnumerable<TSource>

Data.

keySelector Func<TSource, T>

Key selector.

payloadSelector Func<TSource, TPayload>

Payload selector.

receiver ReceiverDescriptor<TArg>

Receiver descriptor.

receiverArg TArg

Receiver arg.

options DataStreamerOptions

Streamer options.

cancellationToken CancellationToken

Cancellation token.

Returns

Task

A Task representing the asynchronous operation.

Type Parameters

TSource

Source item type.

TPayload

Payload type.

TArg

Argument type.

StreamDataAsync<TSource, TPayload, TArg, TResult>(IAsyncEnumerable<TSource>, ReceiverDescriptor<TPayload, TArg, TResult>, Func<TSource, T>, Func<TSource, TPayload>, TArg, DataStreamerOptions?, CancellationToken)

Streams data into the underlying table with a receiver that returns results.

IAsyncEnumerable<TResult> StreamDataAsync<TSource, TPayload, TArg, TResult>(IAsyncEnumerable<TSource> data, ReceiverDescriptor<TPayload, TArg, TResult> receiver, Func<TSource, T> keySelector, Func<TSource, TPayload> payloadSelector, TArg receiverArg, DataStreamerOptions? options = null, CancellationToken cancellationToken = default) where TPayload : notnull

Parameters

data IAsyncEnumerable<TSource>

Data.

receiver ReceiverDescriptor<TPayload, TArg, TResult>

Streamer receiver descriptor.

keySelector Func<TSource, T>

Key selector.

payloadSelector Func<TSource, TPayload>

Payload selector.

receiverArg TArg

Receiver argument.

options DataStreamerOptions

Streamer options.

cancellationToken CancellationToken

Cancellation token.

Returns

IAsyncEnumerable<TResult>

A IAsyncEnumerable<T> with the results from the receiver.

The resulting async enumerator applies back-pressure to the data source, so it should be either fully consumed or disposed to complete the streaming. Disposing the enumerator before it is fully consumed will ignore the remaining results.

Type Parameters

TSource

Source item type.

TPayload

Payload type.

TArg

Argument type.

TResult

Result type.

StreamDataAsync<TSource, TPayload, TArg, TResult>(IAsyncEnumerable<TSource>, Func<TSource, T>, Func<TSource, TPayload>, ReceiverDescriptor<TArg, TResult>, TArg, DataStreamerOptions?, CancellationToken)

Streams data into the underlying table with a receiver that returns results.

[Obsolete("Use StreamDataAsync<TSource, TPayload, TArg, TResult> with ReceiverDescriptor<TPayload, TArg, TResult> instead.")]
IAsyncEnumerable<TResult> StreamDataAsync<TSource, TPayload, TArg, TResult>(IAsyncEnumerable<TSource> data, Func<TSource, T> keySelector, Func<TSource, TPayload> payloadSelector, ReceiverDescriptor<TArg, TResult> receiver, TArg receiverArg, DataStreamerOptions? options = null, CancellationToken cancellationToken = default) where TPayload : notnull

Parameters

data IAsyncEnumerable<TSource>

Data.

keySelector Func<TSource, T>

Key selector.

payloadSelector Func<TSource, TPayload>

Payload selector.

receiver ReceiverDescriptor<TArg, TResult>

Streamer receiver descriptor.

receiverArg TArg

Receiver argument.

options DataStreamerOptions

Streamer options.

cancellationToken CancellationToken

Cancellation token.

Returns

IAsyncEnumerable<TResult>

A IAsyncEnumerable<T> with the results from the receiver.

The resulting async enumerator applies back-pressure to the data source, so it should be either fully consumed or disposed to complete the streaming. Disposing the enumerator before it is fully consumed will ignore the remaining results.

Type Parameters

TSource

Source item type.

TPayload

Payload type.

TArg

Argument type.

TResult

Result type.