NTP Analyzer
0.8.2
Analyze the operation of time servers
|
Public Member Functions | |
Job (JobDescription description, JobScheduleDescription schedule, LogBase log) | |
Initializes a new instance of the Job class. More... | |
void | Execute () |
Execute this Job. More... | |
override string | ToString () |
Returns a string that represents the current Job. More... | |
Static Public Member Functions | |
static void | Reset () |
Public Attributes | |
string | Runtime => Running ? DateTime.Now.Subtract(Started).ToString() : string.Empty |
Gets the time this Job have currently been running. More... | |
string | TotalRuntime => Running ? (DateTime.Now.Subtract(Started) + time).ToString() : time.ToString() |
Gets the total time this Job have been running. More... | |
Properties | |
JobDescription | Description [get] |
Gets the description. More... | |
int | JobId [get] |
Gets the job identifier. More... | |
bool | Postponed [get, set] |
Gets or sets a value indicating whether this Job has been postponed. More... | |
bool | Queued [get, set] |
Gets or sets a value indicating whether this Job is queued for run. More... | |
int | RunCount [get, private set] |
Gets the number of times this Job have been executed. More... | |
bool | Running [get, private set] |
Gets or sets a value indicating whether this Job is running. More... | |
JobScheduleDescription | Schedule [get] |
Gets the schedule. More... | |
DateTime | Started [get, private set] |
Gets the time this this Job was started. More... | |
string | State [get] |
Gets the current state of this Job. More... | |
Private Attributes | |
readonly LogBase | log |
TimeSpan | time = new TimeSpan(0) |
Static Private Attributes | |
static int | nextJobId = 1 |
static readonly object | NextJobLocker = new object() |
|
inline |
Initializes a new instance of the Job class.
description | Description. |
schedule | Schedule. |
log | Log. |
Definition at line 35 of file Job.cs.
|
inline |
Execute this Job.
Definition at line 135 of file Job.cs.
References e.
Referenced by Ntp.Common.Process.Scheduler.ExecuteJob().
|
inlinestatic |
Definition at line 167 of file Job.cs.
Referenced by Ntp.Analyzer.Process.Initializer.InitializeScheduler().
|
inline |
|
staticprivate |
string Ntp.Common.Process.Job.Runtime => Running ? DateTime.Now.Subtract(Started).ToString() : string.Empty |
Gets the time this Job have currently been running.
The runtime.
Definition at line 124 of file Job.cs.
Referenced by Ntp.Analyzer.Monitor.Server.Billboard.Running().
|
private |
string Ntp.Common.Process.Job.TotalRuntime => Running ? (DateTime.Now.Subtract(Started) + time).ToString() : time.ToString() |
Gets the total time this Job have been running.
The runtime.
Definition at line 130 of file Job.cs.
Referenced by Ntp.Analyzer.Monitor.Server.Billboard.Proc().
|
get |
Gets the description.
The description.
Definition at line 71 of file Job.cs.
Referenced by Ntp.Common.Process.Scheduler.ExecuteJob(), Ntp.Analyzer.Monitor.Server.Billboard.Jobs(), Ntp.Analyzer.Monitor.Server.Billboard.Proc(), Ntp.Analyzer.Monitor.Server.Billboard.Running(), Ntp.Common.Process.Scheduler.RunOneCycle(), Ntp.Analyzer.Monitor.Server.Billboard.Schedule(), and Ntp.Common.Log.LogExtensions.SchedulerJobAdded().
|
get |
Gets the job identifier.
The job identifier.
Definition at line 59 of file Job.cs.
Referenced by Ntp.Analyzer.Monitor.Server.Billboard.Jobs(), Ntp.Analyzer.Monitor.Server.Billboard.Proc(), Ntp.Analyzer.Monitor.Server.Billboard.Running(), and Ntp.Analyzer.Monitor.Server.Billboard.Schedule().
|
getset |
Gets or sets a value indicating whether this Job has been postponed.
true
if postponed; otherwise, false
.
Definition at line 83 of file Job.cs.
Referenced by Ntp.Common.Process.Scheduler.PostponeJob(), and Ntp.Common.Process.Scheduler.QueueJob().
|
getset |
Gets or sets a value indicating whether this Job is queued for run.
true
if scheduled; otherwise, false
.
Definition at line 77 of file Job.cs.
Referenced by Ntp.Analyzer.Monitor.Server.Billboard.Jobs(), Ntp.Common.Process.Scheduler.PostponeJob(), Ntp.Common.Process.Scheduler.QueueJob(), and Ntp.Common.Process.Scheduler.RunOneCycle().
|
getprivate set |
Gets the number of times this Job have been executed.
The run count.
Definition at line 101 of file Job.cs.
Referenced by Ntp.Analyzer.Monitor.Server.Billboard.Jobs(), Ntp.Analyzer.Monitor.Server.Billboard.Proc(), Ntp.Analyzer.Monitor.Server.Billboard.Running(), Ntp.Analyzer.Monitor.Server.Billboard.Schedule(), and Ntp.Common.Log.LogExtensions.SchedulerJobStatus().
|
getprivate set |
Gets or sets a value indicating whether this Job is running.
true
if running; otherwise, false
.
Definition at line 89 of file Job.cs.
Referenced by Ntp.Analyzer.Monitor.Server.Billboard.Jobs().
|
get |
Gets the schedule.
The schedule.
Definition at line 65 of file Job.cs.
Referenced by Ntp.Analyzer.Monitor.Server.Billboard.Jobs(), Ntp.Common.Process.Scheduler.PostponeJob(), Ntp.Analyzer.Monitor.Server.Billboard.Proc(), Ntp.Common.Process.Scheduler.QueueJob(), Ntp.Analyzer.Monitor.Server.Billboard.Running(), Ntp.Common.Process.Scheduler.RunOneCycle(), Ntp.Analyzer.Monitor.Server.Billboard.Schedule(), and Ntp.Common.Log.LogExtensions.SchedulerJobAdded().
|
getprivate set |
|
get |
Gets the current state of this Job.
The state.
Definition at line 108 of file Job.cs.
Referenced by Ntp.Analyzer.Monitor.Server.Billboard.Proc(), and Ntp.Analyzer.Monitor.Server.Billboard.Running().