Skip to content

IGrainRuntime Methods

The gateway of the Grain to the Orleans runtime. The Grain should only interact with the runtime through this interface.

DeactivateOnIdle(IGrainContext)

abstract
public abstract void DeactivateOnIdle(IGrainContext grainContext)
Deactivates the provided grain when it becomes idle.

Parameters

grainContextIGrainContext
The grain context.

DelayDeactivation(IGrainContext, TimeSpan)

abstract
public abstract void DelayDeactivation(IGrainContext grainContext, TimeSpan timeSpan)
Delays idle activation collection of the provided grain due to inactivity until at least the specified time has elapsed.

Parameters

grainContextIGrainContext
The grain context.
timeSpanTimeSpan
The time to delay idle activation collection for.

GetStorage(IGrainContext)

abstract
public abstract IStorage<TGrainState> GetStorage<TGrainState>(IGrainContext grainContext)
Gets grain storage for the provided grain.

Parameters

grainContextIGrainContext
The grain context.

Returns

The grain storage for the provided grain.