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

Public Member Functions

 PeerGraphJob (PeerGraphConfiguration config, LogBase log)
 
- Public Member Functions inherited from Ntp.Common.Process.JobDescription
override string ToString ()
 Returns a string that represents the current JobDescription. More...
 

Public Attributes

override string JobType => "Peer graphs generation"
 
override int Priority => 21
 
override ThreadType ThreadType => ThreadType.SingleThreaded
 
- Public Attributes inherited from Ntp.Common.Process.JobDescription
string Name => Configuration.ConfigName
 Gets the name. More...
 

Protected Member Functions

override void InternalExecute ()
 Implementing method for descendants. More...
 
- Protected Member Functions inherited from Ntp.Analyzer.Process.Description.StreamJob
 StreamJob (IJobConfiguration config, LogBase log)
 
void SaveStream (IStreamGenerator generator)
 
void SaveStream (IStreamGenerator generator, string file)
 
- Protected Member Functions inherited from Ntp.Common.Process.JobDescription
 JobDescription (IJobConfiguration config, LogBase log)
 Initializes a new instance of the JobDescription class. More...
 

Private Attributes

readonly PeerGraphConfiguration config
 

Additional Inherited Members

- Package Functions inherited from Ntp.Common.Process.JobDescription
void Execute ()
 Perform execution of this instance. More...
 
- Properties inherited from Ntp.Common.Process.JobDescription
IJobConfiguration Configuration [get]
 Gets the configuration for the job. More...
 
abstract string JobType [get]
 Gets the type of the job as text. More...
 
LogBase Log [get]
 Gets the log to use when registering events. More...
 
abstract int Priority [get]
 Gets the priority to use when scheduling jobs. More...
 
abstract ThreadType ThreadType [get]
 Gets a value indicating whether this JobDescription should run as a single thread. More...
 

Detailed Description

Definition at line 32 of file PeerGraphJob.cs.

Constructor & Destructor Documentation

Ntp.Analyzer.Process.Description.PeerGraphJob.PeerGraphJob ( PeerGraphConfiguration  config,
LogBase  log 
)
inline

Definition at line 34 of file PeerGraphJob.cs.

35  : base(config, log)
36  {
37  this.config = config;
38  }
readonly PeerGraphConfiguration config
Definition: PeerGraphJob.cs:40

Member Function Documentation

override void Ntp.Analyzer.Process.Description.PeerGraphJob.InternalExecute ( )
inlineprotectedvirtual

Implementing method for descendants.

Implements Ntp.Common.Process.JobDescription.

Definition at line 48 of file PeerGraphJob.cs.

References Ntp.Analyzer.Data.DataFace.Hosts, Ntp.Analyzer.Data.DataFace.Instance, and Ntp.Analyzer.Data.DataFace.PeerActivities.

49  {
50  var host = DataFace.Instance.Hosts.SingleOrDefault(h => h.Id == config.HostId);
51  if (host == null)
52  {
53  Log.HostNotFound(config.HostId);
54  return;
55  }
56 
57  var peers = DataFace.Instance.PeerActivities.Where(p => Equals(p.Host, host) && p.IsActive);
58 
59  foreach (var entry in peers)
60  {
61  var graph = new PeerGraph(config, host, entry.Peer);
62  SaveStream(graph, string.Concat(entry.Name, ".", graph.ImageFileExtension));
63  }
64  }
readonly PeerGraphConfiguration config
Definition: PeerGraphJob.cs:40
HostDatabaseMapper Hosts
Gets the host mapper.
Definition: DataFace.cs:57
LogBase Log
Gets the log to use when registering events.
void SaveStream(IStreamGenerator generator)
Definition: StreamJob.cs:36
Singleton facade class used to access memory persistent data.
Definition: DataFace.cs:30
PeerActivityDatabaseMapper PeerActivities
Gets the peer activity mapper.
Definition: DataFace.cs:99
static DataFace Instance
Gets the Singleton instance.
Definition: DataFace.cs:51

Member Data Documentation

readonly PeerGraphConfiguration Ntp.Analyzer.Process.Description.PeerGraphJob.config
private

Definition at line 40 of file PeerGraphJob.cs.

override string Ntp.Analyzer.Process.Description.PeerGraphJob.JobType => "Peer graphs generation"

Definition at line 44 of file PeerGraphJob.cs.

override int Ntp.Analyzer.Process.Description.PeerGraphJob.Priority => 21

Definition at line 46 of file PeerGraphJob.cs.

override ThreadType Ntp.Analyzer.Process.Description.PeerGraphJob.ThreadType => ThreadType.SingleThreaded

Definition at line 42 of file PeerGraphJob.cs.


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