Class HigherOrderInputStatefulOperator<TParam, TResult>
Base class for higher order query operator implementations. Operators are higher order when they receive inner subscribable sequences.
Inheritance
Inherited Members
Namespace: Reaqtive
Assembly: Reaqtive.Linq.dll
Syntax
public abstract class HigherOrderInputStatefulOperator<TParam, TResult> : StatefulOperator<TParam, TResult>, ISubscription, IStatefulOperator, IOperator, IDisposable, IVersioned
Type Parameters
Name | Description |
---|---|
TParam | Type of the parameters passed to the observer. |
TResult | Element type of the result sequence produced by the operator. |
Constructors
HigherOrderInputStatefulOperator(TParam, IObserver<TResult>)
Creates a new higher order operator instance using the given parameters and the observer to report downstream notifications to.
Declaration
protected HigherOrderInputStatefulOperator(TParam parent, IObserver<TResult> observer)
Parameters
Type | Name | Description |
---|---|---|
TParam | parent | Parameters used by the operator. |
System.IObserver<TResult> | observer | Observer receiving the operator's output. |
Methods
LoadInner<TInner>(IOperatorStateReader, IObserver<TInner>)
Loads a subscription to an inner sequence during recovery. The caller is responsible to create a new observer to subscribe to the inner sequence used in the recovered subscription. If the observer has state, it should implement load and save functionality using the IStatefulOperator interface.
Declaration
protected ISubscription LoadInner<TInner>(IOperatorStateReader reader, IObserver<TInner> observer)
Parameters
Type | Name | Description |
---|---|---|
IOperatorStateReader | reader | Reader to read checkpoint state from. |
System.IObserver<TInner> | observer | Observer to subscribe to the inner sequence. |
Returns
Type | Description |
---|---|
ISubscription | Reconstructed subscription to the inner sequence. |
Type Parameters
Name | Description |
---|---|
TInner | Element type of the inner sequence. |
SaveInner(ISubscription, IOperatorStateWriter)
Saves a subscription to an inner sequence during checkpointing. If the observer that was used to create the subscription has state, it should implement load and save functionality using the IStatefulOperator interface.
Declaration
protected void SaveInner(ISubscription innerSubscription, IOperatorStateWriter writer)
Parameters
Type | Name | Description |
---|---|---|
ISubscription | innerSubscription | Inner subscription, retrieved from SubscribeInner, to persist. |
IOperatorStateWriter | writer | Writer to write checkpoint state to. |
SetContext(IOperatorContext)
Sets the operator's context in which it operates.
Declaration
public override void SetContext(IOperatorContext context)
Parameters
Type | Name | Description |
---|---|---|
IOperatorContext | context | Context in which the operator operates. |
Overrides
SubscribeInner<TInner>(ISubscribable<TInner>, IObserver<TInner>)
Subscribes to an inner sequence using the given observer. The inner sequence should have an expression representation in order for the subscription to be checkpointable. If the observer has state that needs to be checkpointed, it should implement load and save functionality using the IStatefulOperator interface. The returned subscription object is cold and needs to be activated by the caller.
Declaration
protected ISubscription SubscribeInner<TInner>(ISubscribable<TInner> inner, IObserver<TInner> observer)
Parameters
Type | Name | Description |
---|---|---|
ISubscribable<TInner> | inner | Inner sequence to subscribe to. |
System.IObserver<TInner> | observer | Observer to subscribe to the inner sequence. |
Returns
Type | Description |
---|---|
ISubscription | Subscription to the inner sequence. The caller is responsible to activate the subscription. In order to save and load the subscription for use in checkpointing, the LoadInner and SaveInner methods should be used. |
Type Parameters
Name | Description |
---|---|
TInner | Element type of the inner sequence. |