Leer en inglés Editar

Compartir a través de


MemoryGrainStorage Class

Definition

This is a simple in-memory grain implementation of a storage provider.

C#
public class MemoryGrainStorage : IDisposable, Orleans.Storage.IGrainStorage
Inheritance
MemoryGrainStorage
Implements

Examples

Example configuration for this storage provider in OrleansConfiguration.xml file:

<OrleansConfiguration xmlns="urn:orleans">
  <Globals>
    <StorageProviders>
      <Provider Type="Orleans.Storage.MemoryStorage" Name="MemoryStore" />
  </StorageProviders>

Remarks

This storage provider is ONLY intended for simple in-memory Development / Unit Test scenarios. This class should NOT be used in Production environment, because [by-design] it does not provide any resilience or long-term persistence capabilities.

Constructors

Methods

ClearStateAsync(String, GrainReference, IGrainState)

Delete / Clear state data function for this storage provider.

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

Delete / Clear data function for this storage instance.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

ReadStateAsync(String, GrainReference, IGrainState)

Read state data function for this storage provider.

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

Read data function for this storage instance.

WriteStateAsync(String, GrainReference, IGrainState)

Write state data function for this storage provider.

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

Write data function for this storage instance.

Applies to

Producto Versiones
.NET Orleans 3.4.5, 3.6.0, 7.0.0, 8.0.0, 8.1.0, 8.2.0, 9.0.0