AdoNetGrainStorage
class
Namespace: Orleans.Storage
Stores grain state in a relational database using ADO.NET.
public class AdoNetGrainStorage : ILifecycleParticipant<ISiloLifecycle>, IGrainStorageRemarks
Configuration is provided through AdoNetGrainStorageOptions.
Configure exactly one of AdoNetGrainStorageOptions or AdoNetGrainStorageOptions.
AdoNetGrainStorageOptions identifies the ADO.NET provider and defaults to Microsoft.Data.SqlClient.
Constructors
AdoNetGrainStorage(IActivatorProvider, ILogger<AdoNetGrainStorage>, IOptions<AdoNetGrainStorageOptions>, IOptions<ClusterOptions>, string)Initializes a new instance of theAdoNetGrainStorageclass.
Properties
CurrentOperationalQueriesThe queries currently used. When this is updated, the new queries will take effect immediately.HashPickerThe hash generator used to hash natural keys, grain ID and grain type to a more narrow index.SerializerGets or sets the serializer used to convert grain state to and from its stored representation.
Methods
ClearStateAsync(string, GrainId, IGrainState<T>)Clear state data function for this storage provider.Participate(ISiloLifecycle)Registers the provider's initialization and shutdown callbacks with the silo lifecycle.ReadStateAsync(string, GrainId, IGrainState<T>)Read state data function for this storage provider.WriteStateAsync(string, GrainId, IGrainState<T>)Write state data function for this storage provider.
Fields
BinaryFormatSerializerTagTag for BinaryFormatSerializerDefaultInitializationQueryThe default query to initialize this structure from the Orleans database.JsonFormatSerializerTagTag for JsonFormatSerializerXmlFormatSerializerTagTag for XmlFormatSerializer
