Skip to content

StateStorageBridge<TState> Methods

Provides functionality for operating on grain state. Implements the Orleans.Core.IStorage

ClearStateAsync

View source
public Task ClearStateAsync()
Clears the grain state.

Returns

A System.Threading.Tasks.Task representing the operation.

OnDehydrate(IDehydrationContext)

View source
public void OnDehydrate(IDehydrationContext dehydrationContext)
Called on the original activation when migration is initiated, after IGrainBase completes. The participant can access and update the dehydration context.

Parameters

dehydrationContextIDehydrationContext
The dehydration context.

OnRehydrate(IRehydrationContext)

View source
public void OnRehydrate(IRehydrationContext rehydrationContext)
Called on the new activation after a migration, before IGrainBase is called. The participant can restore state from the migration context.

Parameters

rehydrationContextIRehydrationContext
The rehydration context.

ReadStateAsync

View source
public Task ReadStateAsync()
Reads grain state from storage.

Returns

A System.Threading.Tasks.Task representing the operation.

WriteStateAsync

View source
public Task WriteStateAsync()
Writes grain state to storage.

Returns

A System.Threading.Tasks.Task representing the operation.