[This is preliminary documentation and is subject to change.]
Subscribes to a stream with callbacks for record receipt, epoch completion notification, and stream completion notification.
Namespace: Microsoft.Research.Naiad
Assembly: Microsoft.Research.Naiad (in Microsoft.Research.Naiad.dll) Version: 0.5.0.0 (0.5.0.0)
Syntax
C#
public static Subscription Subscribe<R>( this Stream<R, Epoch> stream, Action<Message<R, Epoch>, int> onRecv, Action<Epoch, int> onNotify, Action<int> onComplete )
Parameters
- stream
- Type: Microsoft.Research.NaiadStreamR, Epoch
input stream - onRecv
- Type: SystemActionMessageR, Epoch, Int32
receipt callback - onNotify
- Type: SystemActionEpoch, Int32
notification callback - onComplete
- Type: SystemActionInt32
completion callback
Type Parameters
- R
- record type
Return Value
Type: Subscriptionsubscription for synchronization
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type StreamR, Epoch. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).See Also