IDurableStateManager
interface
Namespace: Orleans.Journaling
Manages a grain's durable state, whose named components share a journal and write acknowledgement boundary.
public interface IDurableStateManagerRemarks
Declare state components during grain construction or synchronous activation setup, before initialization. Operations run in the owning activation's execution context. Existing components can be retrieved after initialization, and state contents are available after recovery completes.
Methods
GetOrAddState(string)Gets an existing state component or creates it using the registered implementation of its application contract.TryGetState(string, TState?)Attempts to retrieve an existing state component without creating it.WriteStateAsync(CancellationToken)Persists pending changes to the shared journal.
