MemoryGrainStorageWithLatency Class

Definition

This is a simple in-memory implementation of a storage provider which presents fixed latency of storage calls. This class is useful for system testing and investigation of the effects of storage latency.

public class MemoryGrainStorageWithLatency : Orleans.Storage.IGrainStorage
type MemoryGrainStorageWithLatency = class
    interface IGrainStorage
Public Class MemoryGrainStorageWithLatency
Implements IGrainStorage
Inheritance
MemoryGrainStorageWithLatency
Implements

Examples

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

<OrleansConfiguration xmlns="urn:orleans">
  <Globals>
    <StorageProviders>
      <Provider Type="Orleans.Storage.MemoryStorageWithLatency" Name="MemoryStoreWithLatency" Latency="00:00:00.500"/>
  </StorageProviders>

Remarks

This storage provider is ONLY intended for simple in-memory 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

MemoryGrainStorageWithLatency(String, MemoryStorageWithLatencyOptions, ILoggerFactory, IGrainFactory)

Default constructor.

MemoryGrainStorageWithLatency(String, MemoryStorageWithLatencyOptions, ILoggerFactory, IGrainFactory, IGrainStorageSerializer)

Default constructor.

Methods

ClearStateAsync(String, GrainReference, IGrainState)

Delete / Clear state data function for this storage provider.

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

Delete / Clear state data function for this storage provider.

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