SystemTarget
class
Namespace: Orleans.Runtime
Base class for various system services, such as grain directory, reminder service, etc. Made public for GrainService to inherit from it. Can be turned to internal after a refactoring that would remove the inheritance relation.
public abstract class SystemTarget : ISystemTarget, ISystemTargetBase, IAddressable, IGrainCallCancellationExtension, IGrainContext, IGrainExtension, IGrainExtensionBinder, IGrainTimerRegistry, ITargetHolder, IDisposable, IEquatable<IGrainContext>, IFormattable, ISpanFormattableProperties
ActivationServicesGets theSystem.IServiceProviderthat provides access to the grain activation's service container.DeactivatedGets theSystem.Threading.Tasks.Taskwhich completes when the grain has deactivated.GrainIdGets the grain identity.GrainReferenceGets a reference to this grain.SchedulerGets the scheduler.SiloSilo address of the system target.
Methods
Activate(Dictionary<string, object>, CancellationToken)Start activating this instance.Deactivate(DeactivationReason, CancellationToken)Start deactivating this instance.DisposePerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.GetComponentGets the component with the specified type.GetExtensionReturns the grain extension registered for the providedTExtensionInterface.GetOrSetExtension(Func<TExtension>)Binds an extension to an addressable object, if not already done.GetTargetGets the target instance.Migrate(Dictionary<string, object>, CancellationToken)Starts an attempt to migrating this instance to another location. Migration captures the currentRequestContext, 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.ReceiveMessage(object)Submits an incoming message to this instance.RegisterGrainTimer(Func<CancellationToken, Task>, TimeSpan, TimeSpan)Registers a timer to send regular callbacks to this system target.RegisterGrainTimer(Func<TState, CancellationToken, Task>, TState, TimeSpan, TimeSpan)Registers a timer to send regular callbacks to this grain. This timer will keep the current grain from being deactivated.RegisterTimer(Func<object?, Task>, object?, TimeSpan, TimeSpan)Registers a timer to send regular callbacks to this system target.Rehydrate(IRehydrationContext)Start rehydrating this instance from the provided rehydration context.SetComponent(TComponent?)Sets the provided value as the component for typeTComponent.ToStringReturns a string that represents the current object.
