NTP Analyzer  0.8.2
Analyze the operation of time servers
Ntp.Analyzer.Process.Main Class Reference
Collaboration diagram for Ntp.Analyzer.Process.Main:

Public Member Functions

 Main (string configFile, int pid, string pidFile, string name, LogGroup initlog)
 
void Run ()
 

Private Attributes

readonly string configFile
 
readonly LogGroup initlog
 
readonly string name
 
readonly int pid
 
readonly string pidFile
 

Detailed Description

Definition at line 28 of file Main.cs.

Constructor & Destructor Documentation

Ntp.Analyzer.Process.Main.Main ( string  configFile,
int  pid,
string  pidFile,
string  name,
LogGroup  initlog 
)
inline

Definition at line 30 of file Main.cs.

31  {
32  this.configFile = configFile;
33  this.pid = pid;
34  this.pidFile = pidFile;
35  this.name = name;
36  this.initlog = initlog;
37  }
readonly LogGroup initlog
Definition: Main.cs:40
readonly string pidFile
Definition: Main.cs:43
readonly string name
Definition: Main.cs:41
readonly int pid
Definition: Main.cs:42
readonly string configFile
Definition: Main.cs:39

Member Function Documentation

void Ntp.Analyzer.Process.Main.Run ( )
inline

Definition at line 45 of file Main.cs.

References Ntp.Common.Log.LogFactory.Cleanup(), and Ntp.Common.Log.File.

46  {
47  try
48  {
49  bool reload = true;
50  while (reload)
51  {
52  var i = new Initializer(configFile, pid, pidFile, name, initlog);
53  i.Run();
54 
55  if (!i.Ready)
56  break;
57 
58  var cluster = new Cluster(i.Scheduler, i.Controller, i.Nodes, i.Log);
59  cluster.Activate();
60 
61  reload = i.Controller.Reload;
62 
63  foreach (var listener in i.Listeners)
64  listener.Close();
65 
67  }
68  }
69  finally
70  {
71  if (pidFile != null)
72  {
73  try
74  {
75  File.Delete(pidFile);
76  }
77  catch
78  {
79  // ignored
80  }
81  }
82  }
83  }
readonly LogGroup initlog
Definition: Main.cs:40
readonly string pidFile
Definition: Main.cs:43
readonly string name
Definition: Main.cs:41
static void Cleanup()
Definition: LogFactory.cs:33
readonly int pid
Definition: Main.cs:42
readonly string configFile
Definition: Main.cs:39

Here is the call graph for this function:

Member Data Documentation

readonly string Ntp.Analyzer.Process.Main.configFile
private

Definition at line 39 of file Main.cs.

readonly LogGroup Ntp.Analyzer.Process.Main.initlog
private

Definition at line 40 of file Main.cs.

readonly string Ntp.Analyzer.Process.Main.name
private

Definition at line 41 of file Main.cs.

readonly int Ntp.Analyzer.Process.Main.pid
private

Definition at line 42 of file Main.cs.

readonly string Ntp.Analyzer.Process.Main.pidFile
private

Definition at line 43 of file Main.cs.


The documentation for this class was generated from the following file: