Redigera

Dela via


ICustomStorageInterface<TState,TDelta> Interface

Definition

The storage interface exposed by grains that want to use the CustomStorage log-consistency provider

public interface ICustomStorageInterface<TState,TDelta>
type ICustomStorageInterface<'State, 'Delta> = interface
Public Interface ICustomStorageInterface(Of TState, TDelta)

Type Parameters

TState

The type for the state of the grain.

TDelta

The type for delta objects that represent updates to the state.

Methods

ApplyUpdatesToStorage(IReadOnlyList<TDelta>, Int32)

Applies the given array of deltas to storage, and returns true, if the version in storage matches the expected version. Otherwise, does nothing and returns false. If successful, the version of storage must be increased by the number of deltas.

ReadStateFromStorage()

Reads the current state and version from storage (note that the state object may be mutated by the provider, so it must not be shared).

Applies to