Free cookie consent management tool by TermsFeed Policy Generator

Changeset 6258


Ignore:
Timestamp:
05/23/11 23:06:53 (14 years ago)
Author:
cneumuel
Message:

#1233

  • small cosmetic changes
Location:
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Core.cs

    r6257 r6258  
    3737  /// </summary>
    3838  public class Core : MarshalByRefObject {
     39    public static ILog Log { get; set; }
     40    public static bool AbortRequested { get; set; }
     41
     42    private static HeartbeatManager heartbeatManager;
     43    public static HeartbeatManager HeartbeatManager {
     44      get { return heartbeatManager; }
     45    }
     46
    3947    private ISlaveCommunication clientCom;
    4048    private ServiceHost slaveComm;
     
    4250    private Dictionary<Guid, SlaveJob> slaveJobs = new Dictionary<Guid, SlaveJob>();
    4351    private WcfService wcfService;
    44     private static HeartbeatManager heartbeatManager;
    45 
    46     public static HeartbeatManager HBManager { get { return heartbeatManager; } }
    47     public static ILog Log { get; set; }
     52
    4853    public EventLog ServiceEventLog { get; set; }
    49     public static bool abortRequested { get; set; }
    5054    public Dictionary<Guid, SlaveJob> SlaveJobs { get { return slaveJobs; } }
    5155
     
    5660    /// </summary>
    5761    public void Start() {
    58       abortRequested = false;
     62      AbortRequested = false;
    5963
    6064      try {
     
    9195      }
    9296      finally {
    93         DeRegisterServiceEvents();
     97        DeregisterServiceEvents();
    9498        waitShutdownSem.Release();
    9599      }
     
    106110    private void DispatchMessageQueue() {
    107111      MessageQueue queue = MessageQueue.GetInstance();
    108       while (!abortRequested) {
     112      while (!AbortRequested) {
    109113        MessageContainer container = queue.GetMessage();
    110114        DetermineAction(container);
    111         if (!abortRequested) {
     115        if (!AbortRequested) {
    112116          clientCom.StatusChanged(ConfigManager.Instance.GetStatusForClientConsole());
    113117        }
     
    120124    }
    121125
    122     private void DeRegisterServiceEvents() {
     126    private void DeregisterServiceEvents() {
    123127      WcfService.Instance.Connected -= WcfService_Connected;
    124128      WcfService.Instance.ExceptionOccured -= WcfService_ExceptionOccured;
    125129    }
    126130
    127     void WcfService_ExceptionOccured(object sender, EventArgs<Exception> e) {
     131    private void WcfService_ExceptionOccured(object sender, EventArgs<Exception> e) {
    128132      clientCom.LogMessage(string.Format("Connection to server interruped with exception: {0}", e.Value.Message));
    129133    }
    130134
    131     void WcfService_Connected(object sender, EventArgs e) {
     135    private void WcfService_Connected(object sender, EventArgs e) {
    132136      clientCom.LogMessage("Connected successfully to Hive server");
    133137    }
     
    346350      clientCom.LogMessage("Stopping heartbeat");
    347351      heartbeatManager.StopHeartBeat();
    348       abortRequested = true;
     352      AbortRequested = true;
    349353      clientCom.LogMessage("Logging out");
    350354
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/SlaveJob.cs

    r6248 r6258  
    175175        finally {
    176176          KillAppDomain();
    177           Core.HBManager.AwakeHeartBeatThread();
     177          Core.HeartbeatManager.AwakeHeartBeatThread();
    178178        }
    179179      }
     
    243243        }
    244244      }
    245       Core.HBManager.AwakeHeartBeatThread();
     245      Core.HeartbeatManager.AwakeHeartBeatThread();
    246246    }
    247247
Note: See TracChangeset for help on using the changeset viewer.