Edytuj

Udostępnij za pośrednictwem


SystemTarget Class

Definition

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 : Orleans.ISystemTarget
public abstract class SystemTarget : IEquatable<Orleans.Runtime.IGrainContext>, Orleans.ISystemTarget
public abstract class SystemTarget : IDisposable, IEquatable<Orleans.Runtime.IGrainContext>, ISpanFormattable, Orleans.ISystemTarget, Orleans.Runtime.IGrainExtensionBinder, Orleans.Serialization.Invocation.ITargetHolder
type SystemTarget = class
    interface ISystemTarget
    interface IAddressable
type SystemTarget = class
    interface ISystemTarget
    interface IAddressable
    interface IEquatable<IGrainContext>
type SystemTarget = class
    interface ISystemTarget
    interface IAddressable
    interface IGrainContext
    interface ITargetHolder
    interface IEquatable<IGrainContext>
    interface IGrainExtensionBinder
    interface ISpanFormattable
    interface IFormattable
    interface IDisposable
Public MustInherit Class SystemTarget
Implements ISystemTarget
Public MustInherit Class SystemTarget
Implements IEquatable(Of IGrainContext), ISystemTarget
Public MustInherit Class SystemTarget
Implements IDisposable, IEquatable(Of IGrainContext), IGrainExtensionBinder, ISpanFormattable, ISystemTarget, ITargetHolder
Inheritance
SystemTarget
Derived
Implements

Constructors

SystemTarget()

Only needed to make Reflection happy.

Properties

ActivationServices

Gets the IServiceProvider that provides access to the grain activation's service container.

Deactivated

Gets the Task which completes when the grain has deactivated.

GrainId

Gets the grain identity.

GrainReference

Gets a reference to this grain.

IsLowPriority
Scheduler

Gets the scheduler.

Silo

Silo address of the system target.

Methods

Activate(Dictionary<String,Object>, CancellationToken)

Start activating this instance.

Activate(Dictionary<String,Object>, Nullable<CancellationToken>)

Start activating this instance.

Deactivate(DeactivationReason, CancellationToken)

Start deactivating this instance.

Deactivate(DeactivationReason, Nullable<CancellationToken>)

Start deactivating this instance.

Dispose()
GetComponent<TComponent>()

Gets the component with the specified type.

GetExtension<TExtensionInterface>()

Returns the grain extension registered for the provided TExtensionInterface.

GetOrSetExtension<TExtension,TExtensionInterface>(Func<TExtension>)

Binds an extension to an addressable object, if not already done.

GetTarget<TTarget>()

Gets the target.

Migrate(Dictionary<String,Object>, CancellationToken)
Migrate(Dictionary<String,Object>, Nullable<CancellationToken>)
ReceiveMessage(Object)

Submits an incoming message to this instance.

RegisterTimer(Func<Object,Task>, Object, TimeSpan, TimeSpan, String)

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 grain. This timer will keep the current grain from being deactivated.

Rehydrate(IRehydrationContext)
SetComponent<TComponent>(TComponent)

Sets the provided value as the component for type TComponent.

ToString()

Override of object.ToString()

Explicit Interface Implementations

IEquatable<IGrainContext>.Equals(IGrainContext)

Indicates whether the current object is equal to another object of the same type.

IFormattable.ToString(String, IFormatProvider)
IGrainContext.ActivationId

Gets the activation id.

IGrainContext.Address

Gets the activation address.

IGrainContext.GrainInstance

Gets the grain instance, or null if the grain instance has not been set yet.

IGrainContext.ObservableLifecycle

Gets the observable Grain lifecycle, which can be used to add lifecycle hooks.

ISpanFormattable.TryFormat(Span<Char>, Int32, ReadOnlySpan<Char>, IFormatProvider)
ITargetHolder.GetComponent<TComponent>()

Gets the component with the specified type.

Extension Methods

GetGrainExtension<TComponent>(IGrainContext)

Used by generated code for IGrainExtension interfaces.

AsReference(IAddressable, Type)

Returns a typed reference to the provided grain.

AsReference<TGrainInterface>(IAddressable)

Returns a typed reference to the provided grain.

BindGrainReference(IAddressable, IGrainFactory)

Binds the grain reference to the provided IGrainFactory.

Cast(IAddressable, Type)

Returns a typed reference to the provided grain.

Cast<TGrainInterface>(IAddressable)

Returns a typed reference to the provided grain.

GetGrainId(IAddressable)

Returns the grain id corresponding to the provided grain.

GetPrimaryKey(IAddressable, String)

Returns the Guid representation of a grain primary key.

GetPrimaryKey(IAddressable)

Returns the Guid representation of a grain primary key.

GetPrimaryKeyLong(IAddressable, String)

Returns the long representation of a grain primary key.

GetPrimaryKeyLong(IAddressable)

Returns the long representation of a grain primary key.

GetPrimaryKeyString(IAddressable)

Returns the string primary key of the grain.

IsPrimaryKeyBasedOnLong(IAddressable)

Returns whether part of the primary key is of type long.

DeactivateAsync(IGrainContext, DeactivationReason, Nullable<CancellationToken>)

Deactivates the provided grain.

DeactivateAsync(IGrainContext, DeactivationReason, CancellationToken)

Deactivates the provided grain.

ScheduleTask(SystemTarget, Action)

Schedules the provided action on the SystemTarget's Orleans.Runtime.ISchedulingContext.

ScheduleTask(SystemTarget, Func<Task>)

Schedules the provided action on the SystemTarget's Orleans.Runtime.ISchedulingContext.

ScheduleTask<T>(SystemTarget, Func<Task<T>>)

Schedules the provided action on the SystemTarget.

Applies to