Redigera

Dela via


AdoNetStorageProvider Class

Definition

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

public class AdoNetStorageProvider : Orleans.Storage.IStorageProvider
type AdoNetStorageProvider = class
    interface IStorageProvider
    interface IProvider
Public Class AdoNetStorageProvider
Implements IStorageProvider
Inheritance
AdoNetStorageProvider
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

AdoNetStorageProvider()

Fields

DataConnectionInvariantPropertyName

The canonical constant for relational storage provider connection string.

DataConnectionStringPropertyName

The canonical constant for storage provider connection string.

DefaultAdoInvariantInvariantPropertyName

The default ADO.NET invariant used for storage if none is given. This corresponds to Orleans.Runtime.Constants.INVARIANT_NAME_SQL_SERVER.

DefaultInitializationQuery

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

UseBinaryFormatPropertyName

A slot key for storage binary payload. The format can be native Orleans binary format, Bond or something user configured.

UseJsonFormatPropertyName

A slot key for storage string payload formatted in JSON.

UseXmlFormatPropertyName

A slot key for storage string payload formatted in XML.

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.

Log

Logger used by this storage provider instance.

Name

Name of this storage provider instance.

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.

Close()

Close()

Init(String, IProviderRuntime, IProviderConfiguration)

Initialization function for this storage provider.

ReadStateAsync(String, GrainReference, IGrainState)

Read state data function for this storage provider.

WriteStateAsync(String, GrainReference, IGrainState)

Write state data function for this storage provider.

Applies to