Share via


MemoryStorage 類別

定義

這是儲存體提供者的簡單記憶體內部粒紋實作。

public class MemoryStorage : Orleans.Storage.IStorageProvider
type MemoryStorage = class
    interface IStorageProvider
    interface IProvider
Public Class MemoryStorage
Implements IStorageProvider
繼承
MemoryStorage
衍生
實作

範例

OrleansConfiguration.xml 檔案中此儲存體提供者的範例組態:

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

備註

此儲存體提供者僅適用于簡單的記憶體內部開發/單元測試案例。 此類別不應用於生產環境,因為 [依設計] 它不提供任何復原或長期持續性功能。

建構函式

MemoryStorage()

預設建構函式。

MemoryStorage(Int32)

建構函式 - 使用特定數量的存放區粒紋。

欄位

NumStorageGrainsDefaultValue

佇列儲存體粒紋的預設數目。

NumStorageGrainsPropertyName

設定佇列儲存體粒紋數目的字串名稱。

屬性

Log

這個儲存體提供者實例所使用的記錄器。

Name

此儲存體提供者實例的名稱。

方法

ClearStateAsync(String, GrainReference, IGrainState)

刪除/清除此儲存體提供者的狀態資料函式。

Close()

此儲存體提供者的關機函式。

Init(String, IProviderRuntime, IProviderConfiguration)

這個儲存體提供者的初始化函式。

ReadStateAsync(String, GrainReference, IGrainState)

此儲存體提供者的讀取狀態資料函式。

WriteStateAsync(String, GrainReference, IGrainState)

寫入此儲存體提供者的狀態資料函式。

適用於