Edytuj

Udostępnij za pośrednictwem


MemoryStorageWithLatency 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 MemoryStorageWithLatency : Orleans.Storage.MemoryStorage
type MemoryStorageWithLatency = class
    inherit MemoryStorage
Public Class MemoryStorageWithLatency
Inherits MemoryStorage
Inheritance
MemoryStorageWithLatency

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

MemoryStorageWithLatency()

Default constructor.

Fields

NumStorageGrainsDefaultValue

Default number of queue storage grains.

(Inherited from MemoryStorage)
NumStorageGrainsPropertyName

Config string name for number of queue storage grains.

(Inherited from MemoryStorage)

Properties

Log

Logger used by this storage provider instance.

(Inherited from MemoryStorage)
Name

Name of this storage provider instance.

(Inherited from MemoryStorage)

Methods

ClearStateAsync(String, GrainReference, IGrainState)

Delete / Clear state data function for this storage provider.

Close()

Shutdown function for this storage provider.

Init(String, IProviderRuntime, IProviderConfiguration)

Initialization function for this storage provider.

ReadStateAsync(String, GrainReference, IGrainState)

Read state data function for this storage provider.

WriteStateAsync(String, GrainReference, IGrainState)

Write state data function for this storage provider.

Applies to