Free cookie consent management tool by TermsFeed Policy Generator

Changeset 739 for trunk


Ignore:
Timestamp:
11/12/08 15:06:16 (16 years ago)
Author:
kgrading
Message:

moved the MessageQueue enumerator to MessageContainer (#353)

Location:
trunk/sources
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Client.Common/Logging.cs

    r735 r739  
    4646    }
    4747
    48     private Logging() {
    49       eventLogger = new EventLog("Hive Client");   
     48    private Logging() {     
     49      eventLogger = new EventLog("Hive Client");         
    5050    }
    5151
  • trunk/sources/HeuristicLab.Hive.Client.Common/MessageContainer.cs

    r735 r739  
    3131  /// </summary>
    3232  public class MessageContainer {
    33     public MessageQueue.MessageType Message { get; set; }
     33
     34    public enum MessageType { FetchJob, AbortJob, RequestSnapshot, FinishedJob };
     35
     36    public MessageType Message { get; set; }
    3437    public int JobId { get; set; }
    3538
    36     public MessageContainer(MessageQueue.MessageType message) {
     39    public MessageContainer(MessageType message) {
    3740      Message = message;
    3841      JobId = 0;
    3942    }
    40     public MessageContainer(MessageQueue.MessageType message, int jobId) {
     43    public MessageContainer(MessageType message, int jobId) {
    4144      Message = message;
    4245      JobId = jobId;
  • trunk/sources/HeuristicLab.Hive.Client.Common/MessageQueue.cs

    r734 r739  
    3333
    3434    private static MessageQueue instance = null;
    35 
    36     public enum MessageType { FetchJob, AbortJob, RequestSnapshot, FinishedJob };
     35   
    3736    private Queue<MessageContainer> queue = null;
    3837    private Semaphore semaphore = null;
     
    8887    /// </summary>
    8988    /// <param name="message">the Message</param>
    90     public void AddMessage(MessageType message) {
     89    public void AddMessage(MessageContainer.MessageType message) {
    9190      lock (this) {
    9291        queue.Enqueue(new MessageContainer(message));
  • trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs

    r735 r739  
    2929  public class Core {
    3030    public void Start() {
    31       //Logging.getInstance().Info(this.Name, "Info Message");
    32       //Logging.getInstance().Error(this.Name, "Error Message");
    33       //Logging.getInstance().Error(this.Name, "Exception Message", new Exception("Exception"));
     31      Logging.getInstance().Info(this.ToString(), "Info Message");
     32      Logging.getInstance().Error(this.ToString(), "Error Message");
     33      Logging.getInstance().Error(this.ToString(), "Exception Message", new Exception("Exception"));     
    3434
    3535      Heartbeat beat = new Heartbeat();
  • trunk/sources/HeuristicLab.Hive.Client.Core/Heartbeat.cs

    r735 r739  
    6161    void heartbeatTimer_Elapsed(object sender, ElapsedEventArgs e) {
    6262      Console.WriteLine("tick");
    63       MessageQueue.GetInstance().AddMessage(MessageQueue.MessageType.FetchJob);
     63      MessageQueue.GetInstance().AddMessage(MessageContainer.MessageType.FetchJob);
    6464    }
    6565
Note: See TracChangeset for help on using the changeset viewer.