IGrainBase Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Interface for grain implementations
public interface IGrainBase
type IGrainBase = interface
Public Interface IGrainBase
- Derived
Properties
GrainContext |
Gets the grain context. |
Methods
OnActivateAsync(CancellationToken) |
Method overridden by grain implementations to handle activation. |
OnDeactivateAsync(DeactivationReason, CancellationToken) |
Method overridden by grain implementations to handle deactivation. |
Extension Methods
DeactivateOnIdle(IGrainBase) |
Deactivate this grain activation after the current grain method call is completed. This call will mark this activation of the current grain to be deactivated and removed at the end of the current method. The next call to this grain will result in a different activation to be used, which typical means a new activation will be created automatically by the runtime. |
MigrateOnIdle(IGrainBase) |
Starts an attempt to migrating this instance to another location. Migration captures the current RequestContext, making it available to the activation's placement director so that it can consider it when selecting a new location. Migration will occur asynchronously, when no requests are executing, and will not occur if the activation's placement director does not select an alternative location. |
RegisterGrainTimer(IGrainBase, Func<CancellationToken,Task>, GrainTimerCreationOptions) |
Creates a grain timer. |
RegisterGrainTimer(IGrainBase, Func<CancellationToken,Task>, TimeSpan, TimeSpan) |
Creates a grain timer. |
RegisterGrainTimer(IGrainBase, Func<Task>, GrainTimerCreationOptions) | |
RegisterGrainTimer(IGrainBase, Func<Task>, TimeSpan, TimeSpan) |
Creates a grain timer. |
RegisterGrainTimer<TState>(IGrainBase, Func<TState,CancellationToken,Task>, TState, GrainTimerCreationOptions) |
Creates a grain timer. |
RegisterGrainTimer<TState>(IGrainBase, Func<TState,CancellationToken,Task>, TState, TimeSpan, TimeSpan) |
Creates a grain timer. |
RegisterGrainTimer<TState>(IGrainBase, Func<TState,Task>, TState, GrainTimerCreationOptions) | |
RegisterGrainTimer<TState>(IGrainBase, Func<TState,Task>, TState, TimeSpan, TimeSpan) |
Creates a grain timer. |
GetReminder(IGrainBase, String) |
Returns a previously registered reminder. |
GetReminders(IGrainBase) |
Returns a list of all reminders registered by the grain. |
RegisterOrUpdateReminder(IGrainBase, String, TimeSpan, TimeSpan) |
Registers a persistent, reliable reminder to send regular notifications (reminders) to the grain.
The grain must implement the |
UnregisterReminder(IGrainBase, IGrainReminder) |
Unregisters a previously registered reminder. |
GetStreamProvider(IGrainBase, String) |
Gets the stream provider with the specified |