MemoryGrainStorageWithLatency 类

定义

这是存储提供程序的简单内存中实现,它提供存储调用的固定延迟。 此类可用于系统测试和调查存储延迟的影响。

public class MemoryGrainStorageWithLatency : Orleans.Storage.IGrainStorage
type MemoryGrainStorageWithLatency = class
    interface IGrainStorage
Public Class MemoryGrainStorageWithLatency
Implements IGrainStorage
继承
MemoryGrainStorageWithLatency
实现

示例

OrleansConfiguration.xml 文件中此存储提供程序的示例配置:

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

注解

此存储提供程序仅适用于简单的内存中测试方案。 此类不应在生产环境中使用,因为 [按设计] 它不提供任何复原或长期持久性功能。

构造函数

MemoryGrainStorageWithLatency(String, MemoryStorageWithLatencyOptions, ILoggerFactory, IGrainFactory)

默认构造函数。

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

默认构造函数。

方法

ClearStateAsync(String, GrainReference, IGrainState)

删除/清除此存储提供程序的状态数据函数。

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

删除/清除此存储提供程序的状态数据函数。

ReadStateAsync(String, GrainReference, IGrainState)

此存储提供程序的读取状态数据函数。

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

此存储提供程序的读取状态数据函数。

WriteStateAsync(String, GrainReference, IGrainState)

为此存储提供程序编写状态数据函数。

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

为此存储提供程序编写状态数据函数。

适用于