Class ZoneGovernorService
Provides Zone Governor Services - this is a singleton class
Inheritance
System.Object
ZoneGovernorService
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: Azos.Sky.dll
Syntax
public sealed class ZoneGovernorService : Daemon, IDisposable, IDaemon, IDaemonView, IApplicationComponent, INamed, IConfigurable, ILocalizedTimeProvider
Constructors
ZoneGovernorService(IApplication)
Creates a singleton instance or throws if instance is already created
Declaration
public ZoneGovernorService(IApplication app)
Parameters
Fields
CONFIG_LEVEL_ATTR
Declaration
public const string CONFIG_LEVEL_ATTR = "level"
Field Value
Type |
Description |
System.String |
|
CONFIG_REDUCE_DETAIL_SECTION
Declaration
public const string CONFIG_REDUCE_DETAIL_SECTION = "reduce-detail"
Field Value
Type |
Description |
System.String |
|
CONFIG_SUB_INSTRUMENTATION_SECTION
Declaration
public const string CONFIG_SUB_INSTRUMENTATION_SECTION = "sub-instrumentation"
Field Value
Type |
Description |
System.String |
|
CONFIG_SUB_LOG_SECTION
Declaration
public const string CONFIG_SUB_LOG_SECTION = "sub-log"
Field Value
Type |
Description |
System.String |
|
CONFIG_TYPE_SECTION
Declaration
public const string CONFIG_TYPE_SECTION = "type"
Field Value
Type |
Description |
System.String |
|
CONFIG_ZONE_GOVERNOR_SECTION
Declaration
public const string CONFIG_ZONE_GOVERNOR_SECTION = "zone-governor"
Field Value
Type |
Description |
System.String |
|
SUB_HOST_MAX_AGE_SEC
Declaration
public const int SUB_HOST_MAX_AGE_SEC = 420
Field Value
Type |
Description |
System.Int32 |
|
THREAD_GRANULARITY_MS
Declaration
public const int THREAD_GRANULARITY_MS = 3120
Field Value
Type |
Description |
System.Int32 |
|
THREAD_NAME
Declaration
public const string THREAD_NAME = "ZoneGovernorService"
Field Value
Type |
Description |
System.String |
|
Properties
App
Declaration
public ISkyApplication App { get; }
Property Value
ComponentCommonName
Declaration
public override string ComponentCommonName { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
ComponentLogTopic
Declaration
public override string ComponentLogTopic { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
CPULoadFactor
A form of throttling.
Returns the coefficient 0.0 .. 1.0 that stipulates how much more work/load the node is ready to take.
The higher the CPU usage, the lower this number gets (closer to 0.0)
Declaration
public double CPULoadFactor { get; }
Property Value
Type |
Description |
System.Double |
|
Locker
Returns locking server that this zgov hosts
Declaration
public ILocker Locker { get; }
Property Value
SubordinateInstrumentation
Returns instrumentation as reported by subordinate telemetry callers
Declaration
public IInstrumentation SubordinateInstrumentation { get; }
Property Value
SubordinateInstrumentationCallerCount
Returns the number of active subordinate telemetry uploaders -
nodes that upload telemetry to this Zone Governor
Declaration
public int SubordinateInstrumentationCallerCount { get; }
Property Value
Type |
Description |
System.Int32 |
|
Methods
Destructor()
Declaration
protected override void Destructor()
Overrides
Declaration
protected override void DoConfigure(IConfigSectionNode node)
Parameters
Overrides
DoSignalStop()
Declaration
protected override void DoSignalStop()
Overrides
DoStart()
Declaration
protected override void DoStart()
Overrides
DoWaitForCompleteStop()
Declaration
protected override void DoWaitForCompleteStop()
Overrides
GetDynamicHostInfo(DynamicHostID)
Declaration
public DynamicHostInfo GetDynamicHostInfo(DynamicHostID hid)
Parameters
Returns
GetSubordinateHost(String)
Returns information for specified subordinate host or null
Declaration
public HostInfo GetSubordinateHost(string hostName)
Parameters
Type |
Name |
Description |
System.String |
hostName |
|
Returns
GetSubordinateHosts(String)
Returns registred subordinate hosts, optionally taking search pattern. This method implements IZoneHostRegistry contract.
Match pattern can contain up to one * wildcard and multiple ? wildcards
Declaration
public IEnumerable<HostInfo> GetSubordinateHosts(string hostNameSearchPattern)
Parameters
Type |
Name |
Description |
System.String |
hostNameSearchPattern |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<HostInfo> |
|
GetSubordinateInstrumentationLogBuffer(Boolean)
Returns log messages from cyclical subordinate instrumentation buffer.
Please note that in order to use this property subordinate instrumentation service
must have its InstrumentationEnabled property set to true
Declaration
public IEnumerable<Message> GetSubordinateInstrumentationLogBuffer(bool asc)
Parameters
Type |
Name |
Description |
System.Boolean |
asc |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Message> |
|
PostDynamicHostInfo(DynamicHostID, DateTime, String, Int32)
Declaration
public void PostDynamicHostInfo(DynamicHostID hid, DateTime stamp, string owner, int votes)
Parameters
Type |
Name |
Description |
DynamicHostID |
hid |
|
System.DateTime |
stamp |
|
System.String |
owner |
|
System.Int32 |
votes |
|
PostHostInfo(HostInfo, Nullable<DynamicHostID>)
Declaration
public void PostHostInfo(HostInfo host, DynamicHostID? hid)
Parameters
RegisterSubordinateHost(HostInfo, Nullable<DynamicHostID>)
Registers /updates existing subordinate host information. This method implements IZoneHostRegistry contract
Declaration
public void RegisterSubordinateHost(HostInfo host, DynamicHostID? hid)
Parameters
SendLog(String, String, Message[])
Called by subordinate nodes to report log
Declaration
public int SendLog(string host, string appName, Message[] data)
Parameters
Type |
Name |
Description |
System.String |
host |
|
System.String |
appName |
|
Message[] |
data |
|
Returns
Type |
Description |
System.Int32 |
|
SendTelemetry(String, Datum[])
Called by subordinate nodes to report telemetry
Declaration
public int SendTelemetry(string host, Datum[] data)
Parameters
Type |
Name |
Description |
System.String |
host |
|
Datum[] |
data |
|
Returns
Type |
Description |
System.Int32 |
|
Spawn(String, String)
Declaration
public DynamicHostID Spawn(string hostPath, string id)
Parameters
Type |
Name |
Description |
System.String |
hostPath |
|
System.String |
id |
|
Returns
Implements
System.IDisposable
Extension Methods