Edit

Share via


AdoNetGrainStorage Class

Definition

A storage provider for writing grain state data to relational storage.

public class AdoNetGrainStorage : Orleans.ILifecycleParticipant<Orleans.Runtime.ISiloLifecycle>, Orleans.Storage.IGrainStorage
type AdoNetGrainStorage = class
    interface IGrainStorage
    interface ILifecycleParticipant<ISiloLifecycle>
Public Class AdoNetGrainStorage
Implements IGrainStorage, ILifecycleParticipant(Of ISiloLifecycle)
Inheritance
AdoNetGrainStorage
Implements

Remarks

Required configuration params: DataConnectionString

Optional configuration params: AdoInvariant -- defaults to System.Data.SqlClientUseJsonFormat -- defaults to falseUseXmlFormat -- defaults to falseUseBinaryFormat -- defaults to true

Constructors

AdoNetGrainStorage(ILogger<AdoNetGrainStorage>, IProviderRuntime, IOptions<AdoNetGrainStorageOptions>, IOptions<ClusterOptions>, String)

Fields

BinaryFormatSerializerTag

Tag for BinaryFormatSerializer

DefaultInitializationQuery

The default query to initialize this structure from the Orleans database.

JsonFormatSerializerTag

Tag for JsonFormatSerializer

XmlFormatSerializerTag

Tag for XmlFormatSerializer

Properties

CurrentOperationalQueries

The queries currently used. When this is updated, the new queries will take effect immediately.

HashPicker

The hash generator used to hash natural keys, grain ID and grain type to a more narrow index.

Serializer
StorageSerializationPicker

A strategy to pick a serializer or a deserializer for storage operations. This can be used to:

  1. Add a custom serializer or deserializer for use in storage provider operations.
  2. In combination with serializer or deserializer to update stored object version.
  3. Per-grain storage format selection
  4. Switch storage format first by reading using the save format and then writing in the new format.

Methods

ClearStateAsync(String, GrainReference, IGrainState)

Clear state data function for this storage provider.

ClearStateAsync<T>(String, GrainId, IGrainState<T>)

Clear state data function for this storage provider.

Participate(ISiloLifecycle)
ReadStateAsync(String, GrainReference, IGrainState)

Read state data function for this storage provider.

ReadStateAsync<T>(String, GrainId, IGrainState<T>)

Read state data function for this storage provider.

WriteStateAsync(String, GrainReference, IGrainState)

Write state data function for this storage provider.

WriteStateAsync<T>(String, GrainId, IGrainState<T>)

Write state data function for this storage provider.

Applies to