Class AgentServiceBase
Provides base abstraction for some continuously running daemon (an agent) having a dedicated thread
Inheritance
System.Object
AgentServiceBase
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)
Namespace: Azos.Sky.Workers.Server
Assembly: Azos.Sky.dll
Syntax
public abstract class AgentServiceBase : DaemonWithInstrumentation<IApplicationComponent>, IDisposable, IDaemon, IDaemonView, IApplicationComponent, INamed, IConfigurable, ILocalizedTimeProvider, IInstrumentable, IExternallyParameterized
Constructors
AgentServiceBase(IApplicationComponent)
Declaration
protected AgentServiceBase(IApplicationComponent director)
Parameters
Type | Name | Description |
---|---|---|
IApplicationComponent | director |
AgentServiceBase(IApplication)
Declaration
protected AgentServiceBase(IApplication app)
Parameters
Type | Name | Description |
---|---|---|
IApplication | app |
Fields
DEFAULT_INSTRUMENTATION_GRANULARITY_MS
Declaration
public const int DEFAULT_INSTRUMENTATION_GRANULARITY_MS = 5000
Field Value
Type | Description |
---|---|
System.Int32 |
DEFAULT_STARTUP_DELAY_SEC
Declaration
public const int DEFAULT_STARTUP_DELAY_SEC = 60
Field Value
Type | Description |
---|---|
System.Int32 |
THREAD_GRANULARITY_MS
Declaration
public const int THREAD_GRANULARITY_MS = 1750
Field Value
Type | Description |
---|---|
System.Int32 |
Properties
App
Declaration
public ISkyApplication App { get; }
Property Value
Type | Description |
---|---|
ISkyApplication |
InstrumentationEnabled
Declaration
[Config]
[ExternalParameter(new string[]{"worker", "instrumentation"})]
public override bool InstrumentationEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Azos.Apps.DaemonWithInstrumentation<Azos.Apps.IApplicationComponent>.InstrumentationEnabled
InstrumentationGranularityMs
Specifies how often instrumentation gets dumped, return 0 for default
Declaration
[Config]
[ExternalParameter(new string[]{"instrumentation"})]
public virtual int InstrumentationGranularityMs { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
StartupDelaySec
When set, imposes a delay between agent daemon start and actual processing start
Declaration
[Config(Default = 60)]
public int StartupDelaySec { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
ThreadGranularityMs
Overrides main thread granularity, return 0 for auto
Declaration
public virtual int ThreadGranularityMs { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
DoDumpStats(IInstrumentation, DateTime)
Declaration
protected virtual void DoDumpStats(IInstrumentation instr, DateTime utcNow)
Parameters
Type | Name | Description |
---|---|---|
IInstrumentation | instr | |
System.DateTime | utcNow |
DoResetStats(DateTime)
Declaration
protected virtual void DoResetStats(DateTime utcNow)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | utcNow |
DoSignalStop()
Declaration
protected override void DoSignalStop()
Overrides
DoStart()
Declaration
protected override void DoStart()
Overrides
DoThreadSpin(DateTime)
Declaration
protected abstract void DoThreadSpin(DateTime utcNow)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | utcNow |
DoWaitForCompleteStop()
Declaration
protected override void DoWaitForCompleteStop()
Overrides
Implements
System.IDisposable