Class HostGovernorService
Provides Host Governor Services - this is a singleton class
Inheritance
System.Object
HostGovernorService
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 HostGovernorService : Daemon, IDisposable, IDaemon, IDaemonView, IApplicationComponent, INamed, IConfigurable, ILocalizedTimeProvider, IPinger, ISkyService
Constructors
HostGovernorService(IApplication, Boolean, Boolean)
Creates a singleton instance or throws if instance is already created
Declaration
public HostGovernorService(IApplication app, bool launchedByARD, bool ardUpdateProblem)
Parameters
Type |
Name |
Description |
IApplication |
app |
|
System.Boolean |
launchedByARD |
|
System.Boolean |
ardUpdateProblem |
|
Fields
CONFIG_DYNAMIC_HOST_ID_ATTR
Declaration
public const string CONFIG_DYNAMIC_HOST_ID_ATTR = "dynamic-host-id"
Field Value
Type |
Description |
System.String |
|
CONFIG_HOST_GOVERNOR_SECTION
Declaration
public const string CONFIG_HOST_GOVERNOR_SECTION = "host-governor"
Field Value
Type |
Description |
System.String |
|
CONFIG_STARTUP_INSTALL_CHECK_ATTR
Declaration
public const string CONFIG_STARTUP_INSTALL_CHECK_ATTR = "startup-install-check"
Field Value
Type |
Description |
System.String |
|
THREAD_GRANULARITY_MS
Declaration
public const int THREAD_GRANULARITY_MS = 3000
Field Value
Type |
Description |
System.Int32 |
|
THREAD_NAME
Declaration
public const string THREAD_NAME = "HostGovernorService"
Field Value
Type |
Description |
System.String |
|
Properties
AllPackages
Gets all unique Metabank.SectionApplication.AppPackage(s) for all applications on this host
Declaration
public IEnumerable<Metabank.SectionApplication.AppPackage> AllPackages { get; }
Property Value
AppStartOrder
Returns current application start order, the sequence # of the next app start
Declaration
public int AppStartOrder { get; }
Property Value
Type |
Description |
System.Int32 |
|
ARDUpdateProblem
Returns true when this process was launched by Azos Sky Root Daemon that could not perform update properly -
most likely UPD and RUN folders locked by some other process
Declaration
public bool ARDUpdateProblem { get; }
Property Value
Type |
Description |
System.Boolean |
|
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
DynamicHostID
Declaration
public DynamicHostID? DynamicHostID { get; }
Property Value
LaunchedByARD
Returns true when this process was launched by Sky Root Daemon as opposed to being launched from console/script
Declaration
public bool LaunchedByARD { get; }
Property Value
Type |
Description |
System.Boolean |
|
ManagedApps
Returns a thread-safe copy of ManagedApps in the instance - applications managed by Azos Sky Host Governor
Declaration
public IEnumerable<ManagedApp> ManagedApps { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<ManagedApp> |
|
NeedsProcessRestart
Becomes true to indocate that the app;ication process should be restarted (by ARD)
Declaration
public bool NeedsProcessRestart { get; }
Property Value
Type |
Description |
System.Boolean |
|
RootPath
Returns the very root path under which "ard","/run-netf","/run-core","/upd" are
Declaration
public string RootPath { get; }
Property Value
Type |
Description |
System.String |
|
RunPath
Returns the full path to "/run" directory out of which the current AHGOV process was launched
Declaration
public string RunPath { get; }
Property Value
Type |
Description |
System.String |
|
StartupInstallCheck
Indicates whether install version check is done on service start (vs being invoked by command)
Declaration
public bool StartupInstallCheck { get; }
Property Value
Type |
Description |
System.Boolean |
|
UpdatePath
Returns the full path to "/upd" directory where AHGOV will place newer files
Declaration
public string UpdatePath { get; }
Property Value
Type |
Description |
System.String |
|
Methods
Initiates check of locally installed packages and if they are different than install set, reinstalls in UpdatePath
Declaration
public bool CheckAndPerformLocalSoftwareInstallation(IList<string> progress, bool force = false)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IList<System.String> |
progress |
|
System.Boolean |
force |
|
Returns
Type |
Description |
System.Boolean |
True if physical install was performed and AHGOV needs to restart so ARD may respawn it
|
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
GetHostInfo()
Declaration
public HostInfo GetHostInfo()
Returns
Ping()
Declaration
Implements
System.IDisposable
Extension Methods