Show / Hide Table of Contents

Class StatefulOperator<TParam, TResult>

Base class for stateful query operator implementations, providing support to load and save operator state during checkpointing and recovery.

Inheritance
System.Object
Operator<TParam, TResult>
VersionedOperator<TParam, TResult>
StatefulOperator<TParam, TResult>
ContextSwitchOperator<TParam, TResult>
HigherOrderInputStatefulOperator<TParam, TResult>
Implements
ISubscription
IStatefulOperator
IOperator
System.IDisposable
IVersioned
Inherited Members
VersionedOperator<TParam, TResult>.Name
VersionedOperator<TParam, TResult>.Version
Operator<TParam, TResult>.Subscribe()
Operator<TParam, TResult>.SetContext(IOperatorContext)
Operator<TParam, TResult>.Start()
Operator<TParam, TResult>.Dispose()
Operator<TParam, TResult>.Dispose(Boolean)
Operator<TParam, TResult>.Accept(ISubscriptionVisitor)
Operator<TParam, TResult>.OnSubscribe()
Operator<TParam, TResult>.OnStart()
Operator<TParam, TResult>.OnDispose()
Operator<TParam, TResult>.Inputs
Operator<TParam, TResult>.Params
Operator<TParam, TResult>.Output
Operator<TParam, TResult>.IsDisposed
Namespace: Reaqtive
Assembly: Reaqtive.Core.dll
Syntax
public abstract class StatefulOperator<TParam, TResult> : VersionedOperator<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

StatefulOperator(TParam, IObserver<TResult>)

Creates a new stateful operator instance using the given parameters and the observer to report downstream notifications to.

Declaration
protected StatefulOperator(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.

Properties

StateChanged

Gets a flag indicating whether state has changed since the last time the operator state got saved.

Declaration
public virtual bool StateChanged { get; protected set; }
Property Value
Type Description
System.Boolean

Methods

LoadState(IOperatorStateReader, Version)

Loads the state of the operator.

Declaration
public void LoadState(IOperatorStateReader reader, Version version)
Parameters
Type Name Description
IOperatorStateReader reader

Reader to read operator state from.

System.Version version

Version of the state being loaded.

LoadStateCore(IOperatorStateReader)

Loads the state of the operator.

Declaration
protected virtual void LoadStateCore(IOperatorStateReader reader)
Parameters
Type Name Description
IOperatorStateReader reader

Reader to read operator state from.

LoadStateCore(IOperatorStateReader, Version)

Loads the state of the operator using the specified state version.

Declaration
protected virtual void LoadStateCore(IOperatorStateReader reader, Version version)
Parameters
Type Name Description
IOperatorStateReader reader

Reader to read operator state from.

System.Version version

Version of the state being read.

OnDispose()

Called when the subscription is disposed.

Declaration
protected override void OnDispose()
Overrides
Reaqtive.Operator<TParam, TResult>.OnDispose()

OnStateSaved()

Called when subscription state was successfully saved.

Declaration
public virtual void OnStateSaved()

SaveState(IOperatorStateWriter, Version)

Saves the state of the operator.

Declaration
public void SaveState(IOperatorStateWriter writer, Version version)
Parameters
Type Name Description
IOperatorStateWriter writer

Writer to write operator state to.

System.Version version

Version of the state being saved.

SaveStateCore(IOperatorStateWriter)

Saves the state of the operator.

Declaration
protected virtual void SaveStateCore(IOperatorStateWriter writer)
Parameters
Type Name Description
IOperatorStateWriter writer

Writer to write operator state to.

SaveStateCore(IOperatorStateWriter, Version)

Saves the state of the operator using the specified state version.

Declaration
protected virtual void SaveStateCore(IOperatorStateWriter writer, Version version)
Parameters
Type Name Description
IOperatorStateWriter writer

Writer to write operator state to.

System.Version version

Version of the state being written.

Implements

ISubscription
IStatefulOperator
IOperator
System.IDisposable
IVersioned
In This Article
Back to top Generated by DocFX