Interface IAsyncBatchObserver<T>
This interface generalizes the IAsyncObserver interface to allow production and consumption of batches of items.
Note that this interface is implemented by item consumers and invoked (used) by item producers. This means that the consumer endpoint of a stream implements this interface.
Inherited Members
Namespace: Orleans.Streams
Assembly: Orleans.Core.Abstractions.dll
Syntax
public interface IAsyncBatchObserver<in T> : IAsyncObserver<T>
Type Parameters
| Name | Description |
|---|---|
| T | The type of object consumed by the observer. |
Methods
| Improve this Doc View SourceOnNextBatchAsync(IEnumerable<T>, StreamSequenceToken)
Passes the next batch of items to the consumer.
The Task returned from this method should be completed when all items in the batch have been sufficiently processed by the consumer to meet any behavioral guarantees.
That is, the semantics of the returned Task is the same as for
OnNextAsync,
extended for all items in the batch.
Declaration
Task OnNextBatchAsync(IEnumerable<T> batch, StreamSequenceToken token = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<T> | batch | The items to be passed. |
| StreamSequenceToken | token | The stream sequence token of this batch of items. |
Returns
| Type | Description |
|---|---|
| Task | A Task that is completed when the batch has been accepted. |