|
NTP Analyzer
0.8.2
Analyze the operation of time servers
|
A scheduler performs scheduling of jobs according to job schedule descriptions. More...


Public Member Functions | |
| Scheduler (LogBase log) | |
| Initializes a new instance of the Scheduler class. More... | |
| void | Add (JobDescription description) |
| Add the specified job to the scheduler queue. More... | |
| void | Dispose () |
| IEnumerator< Job > | GetEnumerator () |
| Gets the enumerator. More... | |
| void | RunOneCycle () |
| Run the scheduler "queue pump" method. More... | |
| void | Stop () |
Public Attributes | |
| IEnumerable< ScheduledJob > | Schedule => schedule |
| Gets the schedule. More... | |
Properties | |
| bool | Active [get, private set] |
| Gets a value indicating whether this Scheduler is active. More... | |
| ActivityLog | ActivityLog [get] |
| Gets the activity log. More... | |
| LogBase | Log [get] |
| Gets the log used by this Scheduler. More... | |
| ScheduledJob | NextJob [get, private set] |
| Gets the next job to be executed. More... | |
| DateTime | StartTime [get] |
| Gets the start up time of this Scheduler. More... | |
| EventWaitHandle | WaitHandle [get] |
| Gets the wait handle of this Scheduler. More... | |
Properties inherited from Ntp.Common.Process.IScheduler | |
| bool | Active [get] |
| ActivityLog | ActivityLog [get] |
| ScheduledJob | NextJob [get] |
| IEnumerable< ScheduledJob > | Schedule [get] |
Private Member Functions | |
| ~Scheduler () | |
| void | Dispose (bool disposing) |
| void | ExecuteJob (Job job) |
| IEnumerator IEnumerable. | GetEnumerator () |
| Gets the enumerator. More... | |
| void | JobThreadStart (object stateInfo) |
| void | PostponeJob (Job job) |
| Postpones the job when putting it to the queue. More... | |
| void | QueueJob (Job job, DateTime run) |
| Queue job for scheduled run. More... | |
Private Attributes | |
| bool | disposedValue |
| bool | firstRun |
| readonly List< Job > | jobs |
| readonly List< Thread > | runningThreads |
| readonly List< ScheduledJob > | schedule |
A scheduler performs scheduling of jobs according to job schedule descriptions.
Definition at line 35 of file Scheduler.cs.
|
inline |
Initializes a new instance of the Scheduler class.
| log | Log. |
Definition at line 41 of file Scheduler.cs.
References Ntp.Common.Log.LogGroup.Add(), Ntp.Common.Log.LogFactory.CreateActivityLog(), and Ntp.Common.Log.LogFactory.CreateGroupLog().

|
inlineprivate |
Definition at line 363 of file Scheduler.cs.
|
inline |
Add the specified job to the scheduler queue.
| description | Description. |
Definition at line 130 of file Scheduler.cs.
References Ntp.Common.Process.JobDescription.Configuration, Ntp.Common.Process.IJobConfiguration.FixedRun, Ntp.Common.Process.IJobConfiguration.Frequency, and Ntp.Common.Process.IJobConfiguration.InitialRun.
Referenced by Ntp.Analyzer.Process.Initializer.InitializeScheduler().

|
inlineprivate |
Definition at line 350 of file Scheduler.cs.
|
inline |
Definition at line 368 of file Scheduler.cs.
|
inlineprivate |
Definition at line 256 of file Scheduler.cs.
References Ntp.Common.Process.Job.Description, e, Ntp.Common.Process.Job.Execute(), and Ntp.Common.Process.JobDescription.Name.

|
inline |
|
inlineprivate |
|
inlineprivate |
Definition at line 268 of file Scheduler.cs.
References e.
|
inlineprivate |
Postpones the job when putting it to the queue.
| job | Job. |
Definition at line 300 of file Scheduler.cs.
References Ntp.Common.Process.JobScheduleDescription.CreatePostponed(), Ntp.Common.Process.Job.Postponed, Ntp.Common.Process.Job.Queued, and Ntp.Common.Process.Job.Schedule.

|
inlineprivate |
Queue job for scheduled run.
| job | Job. |
| run | Run. |
Definition at line 317 of file Scheduler.cs.
References Ntp.Common.Process.JobScheduleDescription.CalculateNextRun(), Ntp.Common.Process.JobScheduleDescription.CanMove, Ntp.Common.Process.JobScheduleDescription.CreateNew(), Ntp.Common.Process.JobScheduleDescription.Frequency, Ntp.Common.Process.Job.Postponed, Ntp.Common.Process.Job.Queued, and Ntp.Common.Process.Job.Schedule.

|
inline |
Run the scheduler "queue pump" method.
Definition at line 151 of file Scheduler.cs.
References Ntp.Common.Process.Job.Description, Ntp.Common.Process.JobScheduleDescription.Frequency, Ntp.Common.Process.ScheduledJob.Job, Ntp.Common.Process.Job.Queued, Ntp.Common.Process.ScheduledJob.Run, Ntp.Common.Process.Job.Schedule, and Ntp.Common.Process.JobDescription.ThreadType.
|
inline |
Definition at line 223 of file Scheduler.cs.
|
private |
Definition at line 348 of file Scheduler.cs.
|
private |
Definition at line 64 of file Scheduler.cs.
|
private |
Definition at line 61 of file Scheduler.cs.
|
private |
Definition at line 62 of file Scheduler.cs.
|
private |
Definition at line 63 of file Scheduler.cs.
| IEnumerable<ScheduledJob> Ntp.Common.Process.Scheduler.Schedule => schedule |
|
getprivate set |
Gets a value indicating whether this Scheduler is active.
true if active; otherwise, false.
Definition at line 106 of file Scheduler.cs.
|
get |
|
get |
Gets the log used by this Scheduler.
The log.
Definition at line 82 of file Scheduler.cs.
Referenced by Ntp.Analyzer.Process.Initializer.InitializeScheduler().
|
getprivate set |
|
get |
Gets the start up time of this Scheduler.
The start up time.
Definition at line 76 of file Scheduler.cs.
Referenced by Ntp.Analyzer.Process.Initializer.InitializeScheduler().
|
get |
Gets the wait handle of this Scheduler.
The wait handle.
Definition at line 70 of file Scheduler.cs.
Referenced by Ntp.Common.Process.Cluster.Cluster().