Skip to content

PersistentStateFactory Methods

Creates Orleans.Runtime.IPersistentState instances for grains.

Create(IGrainContext, IPersistentStateConfiguration)

View source
public IPersistentState<TState> Create<TState>(IGrainContext context, IPersistentStateConfiguration cfg)
Creates a persistent state instance for the provided grain.

Parameters

contextIGrainContext
The grain context.
cfgIPersistentStateConfiguration
The state facet configuration.

Returns

A persistent state instance for the provided grain with the specified configuration.

GetFullStateName(IGrainContext, IPersistentStateConfiguration)

virtual
View source
protected virtual string GetFullStateName(IGrainContext context, IPersistentStateConfiguration cfg)
Gets the storage record name for a persistent state instance.

Parameters

contextIGrainContext
The grain context.
cfgIPersistentStateConfiguration
The persistent state configuration.

Returns

The storage record name.