Redigera

Dela via


IStorage<TState> Interface

Definition

Provides method for operating on grain state.

public interface IStorage<TState> where TState : new()
public interface IStorage<TState> : Orleans.Core.IStorage
type IStorage<'State (requires 'State : (new : unit -> 'State))> = interface
type IStorage<'State> = interface
    interface IStorage
Public Interface IStorage(Of TState)
Public Interface IStorage(Of TState)
Implements IStorage

Type Parameters

TState
Derived
Implements

Properties

Etag
RecordExists

Gets a value indicating whether the record already exists.

(Inherited from IStorage)
State

Gets or sets the state.

Methods

ClearStateAsync()

Async method to cause the current grain state data to be cleared and reset. This will usually mean the state record is deleted from backing store, but the specific behavior is defined by the storage provider instance configured for this grain. If Etags do not match, then this operation will fail; Set Etag = null to indicate "always delete".

ReadStateAsync()

Async method to cause refresh of the current grain state data from backing store. Any previous contents of the grain state data will be overwritten.

WriteStateAsync()

Async method to cause write of the current grain state data into backing store. If Etags do not match, then this operation will fail; Set Etag = null to indicate "always overwrite".

Applies to