Azure Storage グレイン永続化プロバイダーは、 Azure Blob Storage と Azure Table Storage の両方をサポートしています。
Azure Table Storage の構成
NuGet から Microsoft.Orleans.Persistence.AzureStorage パッケージをインストールします。 Azure Table Storage プロバイダーはテーブル行に状態を格納し、1 つの列の制限を超えた場合は複数の列に状態を分割します。 各行は、 Azure Table Storage によって課される最大 1 メガバイトを保持できます。
AzureTableSiloBuilderExtensions.AddAzureTableGrainStorage拡張メソッドを使用して、Azure Table Storage グレイン永続化プロバイダーを構成します。
siloBuilder.AddAzureTableGrainStorage(
name: "profileStore",
configureOptions: options =>
{
options.ConfigureTableServiceClient(
"DefaultEndpointsProtocol=https;AccountName=data1;AccountKey=SOMETHING1");
});
Azure Blob Storage の構成
Azure Blob Storage プロバイダーは、状態を BLOB に格納します。
AzureBlobSiloBuilderExtensions.AddAzureBlobGrainStorage拡張メソッドを使用して、Azure Blob Storage グレイン永続化プロバイダーを構成します。
siloBuilder.AddAzureBlobGrainStorage(
name: "profileStore",
configureOptions: options =>
{
options.ConfigureBlobServiceClient(
"DefaultEndpointsProtocol=https;AccountName=data1;AccountKey=SOMETHING1");
});
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
.NET