Bewerken

Delen via


IGrainBase Interface

Definition

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 Orleans.IRemindable interface, and reminders for this grain will be sent to the ReceiveReminder callback method. If the current grain is deactivated when the timer fires, a new activation of this grain will be created to receive this reminder. If an existing reminder with the same name already exists, that reminder will be overwritten with this new reminder. Reminders will always be received by one activation of this grain, even if multiple activations exist for this grain.

UnregisterReminder(IGrainBase, IGrainReminder)

Unregisters a previously registered reminder.

GetStreamProvider(IGrainBase, String)

Gets the stream provider with the specified name.

Applies to