Class RuntimeStateStreamConverter
- Namespace
- DurableTask.Core.Serializing
- Assembly
- DurableTask.Core.dll
A converter that does conversion between the OrchestrationRuntimeState instance and a stream after serialization. The stream is a serialized OrchestrationSessionState that will set as session state. De-serialization is done with fallbacks in the order: OrchestrationSessionState -> OrchestrationRuntimeState -> IList of HistoryEvent.
public class RuntimeStateStreamConverter
- Inheritance
-
RuntimeStateStreamConverter
- Inherited Members
Constructors
RuntimeStateStreamConverter()
public RuntimeStateStreamConverter()
Methods
OrchestrationRuntimeStateToRawStream(OrchestrationRuntimeState, OrchestrationRuntimeState, DataConverter, bool, ISessionSettings, IOrchestrationServiceBlobStore, string)
Convert an OrchestrationRuntimeState instance to a serialized raw stream to be saved in session state.
public static Task<Stream> OrchestrationRuntimeStateToRawStream(OrchestrationRuntimeState newOrchestrationRuntimeState, OrchestrationRuntimeState runtimeState, DataConverter dataConverter, bool shouldCompress, ISessionSettings serviceBusSessionSettings, IOrchestrationServiceBlobStore orchestrationServiceBlobStore, string sessionId)
Parameters
newOrchestrationRuntimeState
OrchestrationRuntimeStateThe new OrchestrationRuntimeState to be serialized
runtimeState
OrchestrationRuntimeStateThe current runtime state
dataConverter
DataConverterA data converter for serialization and deserialization
shouldCompress
boolTrue if should compress when serialization
serviceBusSessionSettings
ISessionSettingsThe service bus session settings
orchestrationServiceBlobStore
IOrchestrationServiceBlobStoreA blob store for external blob storage
sessionId
stringThe session id
Returns
RawStreamToRuntimeState(Stream, string, IOrchestrationServiceBlobStore, DataConverter)
Convert a raw stream to an orchestration runtime state instance.
public static Task<OrchestrationRuntimeState> RawStreamToRuntimeState(Stream rawSessionStream, string sessionId, IOrchestrationServiceBlobStore orchestrationServiceBlobStore, DataConverter dataConverter)
Parameters
rawSessionStream
StreamThe raw session stream to be deserialized
sessionId
stringThe session Id
orchestrationServiceBlobStore
IOrchestrationServiceBlobStoreA blob store for external blob storage
dataConverter
DataConverterA data converter for serialization and deserialization