IAsyncStream<T> Interface

Definition

This interface represents an object that serves as a distributed rendezvous between producers and consumers. It is similar to a Reactive Framework Subject and implements IObserver nor IObservable interfaces.

public interface IAsyncStream<T> : IComparable<Orleans.Streams.IAsyncStream<T>>, IEquatable<Orleans.Streams.IAsyncStream<T>>, Orleans.Streams.IAsyncBatchObserver<T>, Orleans.Streams.IAsyncObservable<T>, Orleans.Streams.IAsyncObserver<T>, Orleans.Streams.IStreamIdentity
public interface IAsyncStream<T> : IComparable<Orleans.Streams.IAsyncStream<T>>, IEquatable<Orleans.Streams.IAsyncStream<T>>, Orleans.Streams.IAsyncBatchObservable<T>, Orleans.Streams.IAsyncBatchProducer<T>, Orleans.Streams.IAsyncObservable<T>, Orleans.Streams.IAsyncObserver<T>, Orleans.Streams.IStreamIdentity
public interface IAsyncStream<T> : IComparable<Orleans.Streams.IAsyncStream<T>>, IEquatable<Orleans.Streams.IAsyncStream<T>>, Orleans.Streams.IAsyncBatchObservable<T>, Orleans.Streams.IAsyncBatchProducer<T>, Orleans.Streams.IAsyncObservable<T>, Orleans.Streams.IAsyncObserver<T>, Orleans.Streams.IAsyncStream
type IAsyncStream<'T> = interface
    interface IStreamIdentity
    interface IEquatable<IAsyncStream<'T>>
    interface IComparable<IAsyncStream<'T>>
    interface IAsyncObservable<'T>
    interface IAsyncBatchObserver<'T>
    interface IAsyncObserver<'T>
type IAsyncStream<'T> = interface
    interface IStreamIdentity
    interface IEquatable<IAsyncStream<'T>>
    interface IComparable<IAsyncStream<'T>>
    interface IAsyncObservable<'T>
    interface IAsyncBatchObservable<'T>
    interface IAsyncBatchProducer<'T>
    interface IAsyncObserver<'T>
type IAsyncStream<'T> = interface
    interface IAsyncStream
    interface IEquatable<IAsyncStream<'T>>
    interface IComparable<IAsyncStream<'T>>
    interface IAsyncObservable<'T>
    interface IAsyncBatchObservable<'T>
    interface IAsyncBatchProducer<'T>
    interface IAsyncObserver<'T>
Public Interface IAsyncStream(Of T)
Implements IAsyncBatchObserver(Of T), IAsyncObservable(Of T), IAsyncObserver(Of T), IComparable(Of IAsyncStream(Of T)), IEquatable(Of IAsyncStream(Of T)), IStreamIdentity
Public Interface IAsyncStream(Of T)
Implements IAsyncBatchObservable(Of T), IAsyncBatchProducer(Of T), IAsyncObservable(Of T), IAsyncObserver(Of T), IComparable(Of IAsyncStream(Of T)), IEquatable(Of IAsyncStream(Of T)), IStreamIdentity
Public Interface IAsyncStream(Of T)
Implements IAsyncBatchObservable(Of T), IAsyncBatchProducer(Of T), IAsyncObservable(Of T), IAsyncObserver(Of T), IAsyncStream, IComparable(Of IAsyncStream(Of T)), IEquatable(Of IAsyncStream(Of T))

Type Parameters

T

The type of object that flows through the stream.

Implements

Properties

Guid

Gets the unique identifier.

(Inherited from IStreamIdentity)
IsRewindable

Determines whether this is a rewindable stream - supports subscribing from previous point in time.

Namespace

Gets the namespace.

(Inherited from IStreamIdentity)
ProviderName

Stream Provider Name.

StreamId

Gets the stream identifier.

(Inherited from IAsyncStream)

Methods

GetAllSubscriptionHandles()

Retrieves a list of all active subscriptions created by the caller for this stream.

OnCompletedAsync()

Notifies the consumer that the stream was completed.

The Task returned from this method should be completed when the consumer is done processing the stream closure.

(Inherited from IAsyncObserver<T>)
OnErrorAsync(Exception)

Notifies the consumer that the stream had an error.

The Task returned from this method should be completed when the consumer is done processing the stream closure.

(Inherited from IAsyncObserver<T>)
OnNextAsync(IList<SequentialItem<T>>)

Passes the next batch of items to the consumer.

The Task returned from this method should be completed when the items' processing has been sufficiently processed by the consumer to meet any behavioral guarantees.

When the consumer is the (producer endpoint of) a stream, the Task is completed when the stream implementation has accepted responsibility for the items and is assured of meeting its delivery guarantees. For instance, a stream based on a durable queue would complete the Task when the items have been durably saved. A stream that provides best-effort at most once delivery would return a Task that is already complete.

When the producer is the (consumer endpoint of) a stream, the Task should be completed by the consumer code when it has accepted responsibility for the items. In particular, if the stream provider guarantees at-least-once delivery, then the items should not be considered delivered until the Task returned by the consumer has been completed.

(Inherited from IAsyncBatchObserver<T>)
OnNextAsync(T, StreamSequenceToken)

Passes the next item to the consumer.

The Task returned from this method should be completed when the item's processing has been sufficiently processed by the consumer to meet any behavioral guarantees.

When the consumer is the (producer endpoint of) a stream, the Task is completed when the stream implementation has accepted responsibility for the item and is assured of meeting its delivery guarantees. For instance, a stream based on a durable queue would complete the Task when the item has been durably saved. A stream that provides best-effort at most once delivery would return a Task that is already complete.

When the producer is the (consumer endpoint of) a stream, the Task should be completed by the consumer code when it has accepted responsibility for the item. In particular, if the stream provider guarantees at-least-once delivery, then the item should not be considered delivered until the Task returned by the consumer has been completed.

(Inherited from IAsyncObserver<T>)
OnNextBatchAsync(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(T, StreamSequenceToken), extended for all items in the batch.

(Inherited from IAsyncBatchProducer<T>)
SubscribeAsync(IAsyncBatchObserver<T>, StreamSequenceToken)

Subscribe a consumer to this batch observable.

(Inherited from IAsyncBatchObservable<T>)
SubscribeAsync(IAsyncBatchObserver<T>)

Subscribe a consumer to this batch observable.

(Inherited from IAsyncBatchObservable<T>)
SubscribeAsync(IAsyncObserver<T>, StreamSequenceToken, StreamFilterPredicate, Object)

Subscribe a consumer to this observable.

(Inherited from IAsyncObservable<T>)
SubscribeAsync(IAsyncObserver<T>, StreamSequenceToken, String)

Subscribe a consumer to this observable.

(Inherited from IAsyncObservable<T>)
SubscribeAsync(IAsyncObserver<T>)

Subscribe a consumer to this observable.

(Inherited from IAsyncObservable<T>)

Extension Methods

SubscribeAsync<T>(IAsyncBatchObservable<T>, Func<IList<SequentialItem<T>>,Task>, Func<Exception,Task>, Func<Task>)

Subscribe a consumer to this observable using delegates. This method is a helper for the IAsyncBatchObservable.SubscribeAsync allowing the subscribing class to inline the handler methods instead of requiring an instance of IAsyncBatchObserver.

SubscribeAsync<T>(IAsyncBatchObservable<T>, Func<IList<SequentialItem<T>>,Task>, Func<Exception,Task>)

Subscribe a consumer to this observable using delegates. This method is a helper for the IAsyncBatchObservable.SubscribeAsync allowing the subscribing class to inline the handler methods instead of requiring an instance of IAsyncBatchObserver.

SubscribeAsync<T>(IAsyncBatchObservable<T>, Func<IList<SequentialItem<T>>,Task>, Func<Task>)

Subscribe a consumer to this observable using delegates. This method is a helper for the IAsyncBatchObservable.SubscribeAsync allowing the subscribing class to inline the handler methods instead of requiring an instance of IAsyncBatchObserver.

SubscribeAsync<T>(IAsyncBatchObservable<T>, Func<IList<SequentialItem<T>>,Task>)

Subscribe a consumer to this observable using delegates. This method is a helper for the IAsyncBatchObservable.SubscribeAsync allowing the subscribing class to inline the handler methods instead of requiring an instance of IAsyncBatchObserver.

SubscribeAsync<T>(IAsyncObservable<T>, Func<T,StreamSequenceToken,Task>, StreamSequenceToken, StreamFilterPredicate, Object)

Subscribe a consumer to this observable using delegates. This method is a helper for the IAsyncObservable.SubscribeAsync allowing the subscribing class to inline the handler methods instead of requiring an instance of IAsyncObserver.

SubscribeAsync<T>(IAsyncObservable<T>, Func<T,StreamSequenceToken,Task>, StreamSequenceToken)

Subscribe a consumer to this observable using delegates. This method is a helper for the IAsyncObservable.SubscribeAsync allowing the subscribing class to inline the handler methods instead of requiring an instance of IAsyncObserver.

SubscribeAsync<T>(IAsyncObservable<T>, Func<T,StreamSequenceToken,Task>, Func<Exception,Task>, StreamSequenceToken, StreamFilterPredicate, Object)

Subscribe a consumer to this observable using delegates. This method is a helper for the IAsyncObservable.SubscribeAsync allowing the subscribing class to inline the handler methods instead of requiring an instance of IAsyncObserver.

SubscribeAsync<T>(IAsyncObservable<T>, Func<T,StreamSequenceToken,Task>, Func<Exception,Task>, StreamSequenceToken)

Subscribe a consumer to this observable using delegates. This method is a helper for the IAsyncObservable.SubscribeAsync allowing the subscribing class to inline the handler methods instead of requiring an instance of IAsyncObserver.

SubscribeAsync<T>(IAsyncObservable<T>, Func<T,StreamSequenceToken, Task>, Func<Exception,Task>, Func<Task>, StreamSequenceToken, StreamFilterPredicate, Object)

Subscribe a consumer to this observable using delegates. This method is a helper for the IAsyncObservable.SubscribeAsync allowing the subscribing class to inline the handler methods instead of requiring an instance of IAsyncObserver.

SubscribeAsync<T>(IAsyncObservable<T>, Func<T,StreamSequenceToken,Task>, Func<Exception,Task>, Func<Task>, StreamSequenceToken)

Subscribe a consumer to this observable using delegates. This method is a helper for the IAsyncObservable.SubscribeAsync allowing the subscribing class to inline the handler methods instead of requiring an instance of IAsyncObserver.

SubscribeAsync<T>(IAsyncObservable<T>, Func<T,StreamSequenceToken,Task>, Func<Exception,Task>, Func<Task>)

Subscribe a consumer to this observable using delegates. This method is a helper for the IAsyncObservable.SubscribeAsync allowing the subscribing class to inline the handler methods instead of requiring an instance of IAsyncObserver.

SubscribeAsync<T>(IAsyncObservable<T>, Func<T,StreamSequenceToken,Task>, Func<Exception,Task>)

Subscribe a consumer to this observable using delegates. This method is a helper for the IAsyncObservable.SubscribeAsync allowing the subscribing class to inline the handler methods instead of requiring an instance of IAsyncObserver.

SubscribeAsync<T>(IAsyncObservable<T>, Func<T,StreamSequenceToken,Task>, Func<Task>, StreamSequenceToken, StreamFilterPredicate, Object)

Subscribe a consumer to this observable using delegates. This method is a helper for the IAsyncObservable.SubscribeAsync allowing the subscribing class to inline the handler methods instead of requiring an instance of IAsyncObserver.

SubscribeAsync<T>(IAsyncObservable<T>, Func<T,StreamSequenceToken,Task>, Func<Task>, StreamSequenceToken)

Subscribe a consumer to this observable using delegates. This method is a helper for the IAsyncObservable.SubscribeAsync allowing the subscribing class to inline the handler methods instead of requiring an instance of IAsyncObserver.

SubscribeAsync<T>(IAsyncObservable<T>, Func<T,StreamSequenceToken,Task>, Func<Task>)

Subscribe a consumer to this observable using delegates. This method is a helper for the IAsyncObservable.SubscribeAsync allowing the subscribing class to inline the handler methods instead of requiring an instance of IAsyncObserver.

SubscribeAsync<T>(IAsyncObservable<T>, Func<T,StreamSequenceToken,Task>)

Subscribe a consumer to this observable using delegates. This method is a helper for the IAsyncObservable.SubscribeAsync allowing the subscribing class to inline the handler methods instead of requiring an instance of IAsyncObserver.

Applies to