Class StateManager
Provides a set of methods to perform state management operations.
Inheritance
Namespace: Reaqtive
Assembly: Reaqtive.Core.dll
Syntax
public static class StateManager : Object
Methods
LoadState(IOperatorStateReader, IStatefulOperator)
Loads the state of the specified stateful operator from the specified state reader.
Declaration
public static void LoadState(this IOperatorStateReader reader, IStatefulOperator node)
Parameters
Type | Name | Description |
---|---|---|
IOperatorStateReader | reader | Reader to read operator state from. |
IStatefulOperator | node | Operator whose state to read. |
LoadState(IOperatorStateReaderFactory, IStatefulOperator)
Loads the state of the specified stateful operator using a reader obtained from the specified state reader factory.
Declaration
public static void LoadState(this IOperatorStateReaderFactory factory, IStatefulOperator node)
Parameters
Type | Name | Description |
---|---|---|
IOperatorStateReaderFactory | factory | Factory to create an operator state reader to read operator state from. |
IStatefulOperator | node | Operator whose state to read. |
LoadVersionInfo(IOperatorStateReader, IVersioned)
Loads version information from the specified state reader and asserts that the version name tag matches with the specified versioned artifact's.
Declaration
public static Version LoadVersionInfo(this IOperatorStateReader reader, IVersioned versioned)
Parameters
Type | Name | Description |
---|---|---|
IOperatorStateReader | reader | Reader to read version state from. |
IVersioned | versioned | Version artifact whose version name tag to compart to the version information read from the reader. |
Returns
Type | Description |
---|---|
System.Version | The version number read from the state reader. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown if the state reader read a version name tag that doesn't match the name tag in the specified version artifact. |
SaveState(IOperatorStateWriter, IStatefulOperator)
Saves the state of the specified stateful operator to the specified state writer.
Declaration
public static void SaveState(this IOperatorStateWriter writer, IStatefulOperator node)
Parameters
Type | Name | Description |
---|---|---|
IOperatorStateWriter | writer | Writer to write operator state to. |
IStatefulOperator | node | Operator whose state to write. |
SaveState(IOperatorStateWriterFactory, IStatefulOperator)
Saves the state of the specified stateful operator using a writer obtained from the specified state writer factory.
Declaration
public static void SaveState(this IOperatorStateWriterFactory factory, IStatefulOperator node)
Parameters
Type | Name | Description |
---|---|---|
IOperatorStateWriterFactory | factory | Factory to create an operator state writer to write operator state to. |
IStatefulOperator | node | Operator whose state to write. |
SaveVersionInfo(IOperatorStateWriter, IVersioned)
Saves the version information of the specified versioned artifact to the specified operator state writer.
Declaration
public static void SaveVersionInfo(this IOperatorStateWriter writer, IVersioned versioned)
Parameters
Type | Name | Description |
---|---|---|
IOperatorStateWriter | writer | Write to write version information to. |
IVersioned | versioned | Versioned artifact whose version information to write to the state writer. |