Skip to content

IManagementGrain Methods

Interface for system management functions of silos, exposed as a grain for receiving remote requests / commands.

ForceActivationCollection(SiloAddress[], TimeSpan)

abstract
public abstract Task ForceActivationCollection(SiloAddress[] hostsIds, TimeSpan ageLimit)
Perform a run of the Orleans activation collector in the specified silos.

Parameters

hostsIdsSiloAddress[]
List of silos this command is to be sent to.
ageLimitTimeSpan
Maximum idle time of activations to be collected.

Returns

A System.Threading.Tasks.Task representing the work performed.

ForceActivationCollection(TimeSpan)

abstract
public abstract Task ForceActivationCollection(TimeSpan ageLimit)
Forces activation collection.

Parameters

ageLimitTimeSpan
The age limit. Grains which have been idle for longer than this period of time will be eligible for collection.

Returns

A System.Threading.Tasks.Task representing the work performed.

ForceGarbageCollection(SiloAddress[])

abstract
public abstract Task ForceGarbageCollection(SiloAddress[] hostsIds)
Perform a run of the .NET garbage collector in the specified silos.

Parameters

hostsIdsSiloAddress[]
List of silos this command is to be sent to.

Returns

A System.Threading.Tasks.Task representing the work performed.

ForceRuntimeStatisticsCollection(SiloAddress[])

abstract
public abstract Task ForceRuntimeStatisticsCollection(SiloAddress[] siloAddresses)
Perform a run of the silo statistics collector in the specified silos.

Parameters

siloAddressesSiloAddress[]
List of silos this command is to be sent to.

Returns

A System.Threading.Tasks.Task representing the work performed.

GetActivationAddress(IAddressable)

abstract
public abstract ValueTask<SiloAddress> GetActivationAddress(IAddressable reference)
Return the SiloAddress where a given Grain is activated (if any).

Parameters

referenceIAddressable
The IAddressable to look up.

Returns

The SiloAddress where the Grain is activated or null if not activated taken from a snapshot of the last known state of the Grain Catalog.

GetActiveGrains(GrainType)

abstract
public abstract ValueTask<List<GrainId>> GetActiveGrains(GrainType type)
Returns all activations of the specified grain type.

Parameters

typeGrainType
The type.

Returns

A list of all active grains of the specified type.

GetDetailedGrainStatistics(string[], SiloAddress[])

abstract
public abstract Task<DetailedGrainStatistic[]> GetDetailedGrainStatistics(string[] types = null, SiloAddress[] hostsIds = null)
Returns the most recent detailed grain statistics information, amalgamated across silos for the specified types.

Parameters

typesstring[]
Array of grain types to filter the results with
hostsIdsSiloAddress[]
List of silos this command is to be sent to.

Returns

Detailed grain statistics.

GetDetailedHosts(bool)

abstract
public abstract Task<MembershipEntry[]> GetDetailedHosts(bool onlyActive = false)
Get the list of silo hosts and membership information currently known about in this cluster.

Parameters

onlyActivebool
Whether data on just current active silos should be returned, or by default data for all current and previous silo instances [including those in Joining or Dead status].

Returns

The host entries.

GetGrainActivationCount(GrainReference)

abstract
public abstract Task<int> GetGrainActivationCount(GrainReference grainReference)
Gets the grain activation count for a specific grain type.

Parameters

grainReferenceGrainReference
The grain reference.

Returns

Gets the number of activations of grains with the same type as the provided grain reference.

GetGrainCallFrequencies(SiloAddress[])

abstract
public abstract Task<List<GrainCallFrequency>> GetGrainCallFrequencies(SiloAddress[] hostsIds = null)
Gets estimated grain call frequency statistics from the specified hosts.

Parameters

hostsIdsSiloAddress[]
The hosts to request grain call frequency counts from.

Returns

A list of estimated grain call frequencies.

GetHosts(bool)

abstract
public abstract Task<Dictionary<SiloAddress, SiloStatus>> GetHosts(bool onlyActive = false)
Get the list of silo hosts and statuses currently known about in this cluster.

Parameters

onlyActivebool
Whether data on just current active silos should be returned, or by default data for all current and previous silo instances [including those in Joining or Dead status].

Returns

The hosts and their corresponding statuses.

GetRuntimeStatistics(SiloAddress[])

abstract
public abstract Task<SiloRuntimeStatistics[]> GetRuntimeStatistics(SiloAddress[] hostsIds)
Return the most recent silo runtime statistics information for the specified silos.

Parameters

hostsIdsSiloAddress[]
List of silos this command is to be sent to.

Returns

Runtime statistics from the specified hosts.

GetSimpleGrainStatistics

abstract
public abstract Task<SimpleGrainStatistic[]> GetSimpleGrainStatistics()
Return the most recent grain statistics information, amalgamated across all silos.

Returns

Simple grain statistics.

GetSimpleGrainStatistics(SiloAddress[])

abstract
public abstract Task<SimpleGrainStatistic[]> GetSimpleGrainStatistics(SiloAddress[] hostsIds)
Return the most recent grain statistics information, amalgamated across silos.

Parameters

hostsIdsSiloAddress[]
List of silos this command is to be sent to.

Returns

Simple grain statistics for the specified hosts.

GetTotalActivationCount

abstract
public abstract Task<int> GetTotalActivationCount()
Return the total count of all current grain activations across all silos.

Returns

The total number of grain activations across all silos.

ResetGrainCallFrequencies(SiloAddress[])

abstract
public abstract ValueTask ResetGrainCallFrequencies(SiloAddress[] hostsIds = null)
For testing only. Resets grain call frequency counts on the specified hosts.

Parameters

hostsIdsSiloAddress[]
The hosts to invoke the operation on.

Returns

A task representing the work performed.

SendControlCommandToProvider(string, int, object)

abstract
public abstract Task<object[]> SendControlCommandToProvider<T>(string providerName, int command, object arg = null)
Execute a control command on the specified providers on all silos in the cluster. Commands are sent to all known providers on each silo which match both the providerTypeFullName AND providerName parameters.

Parameters

providerNamestring
Provider name to send this command to.
commandint
An id / serial number of this command. This is an opaque value to the Orleans runtime - the control protocol semantics are decided between the sender and provider.
argobject
An opaque command argument. This is an opaque value to the Orleans runtime - the control protocol semantics are decided between the sender and provider.

Returns

Completion promise for this operation.