Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.Hive.Contracts/ResponseHB.cs @ 780

Last change on this file since 780 was 780, checked in by msteinbi, 16 years ago

New methods defined in IClientCommunicator (new response classes and HeartBeatData class) (#351)

File size: 1.2 KB
RevLine 
[780]1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Runtime.Serialization;
6
7namespace HeuristicLab.Hive.Contracts {
8
9  /// <summary>
10  /// If a client sends a heartbeat the server can request sereral actions
11  /// actions:
12  ///  - jobReady: an new Job is ready to be calculated
13  ///  - jobSnapshot: send a snapshot of the current status of the calculated job
14  ///  - abortJobwithReturn: abort the job and return all existing results
15  ///  - abortJobwithoutReturn: abort the job and don't send back anything
16  ///  - nothingToDo: there is nothing to do at the moment
17  /// </summary>
18  public enum Action { jobReady, jobSnapshot, abortJobwithReturn, abortJobwithoutReturn, nothingToDo }
19
20  /// <summary>
21  /// Response Heartbeat class
22  /// Return value to hearbeats sent by the client
23  /// </summary>
24  [DataContract]
25  public class ResponseHB : Response {
26    /// <summary>
27    /// The server can send more than one actionRequest to the client
28    /// So they are stored in one Map
29    /// key [long]: JobId
30    /// value [Action]: action
31    /// </summary>
32    [DataMember]
33    public Dictionary<long, Action> ActionRequest { get; set; }
34  }
35}
Note: See TracBrowser for help on using the repository browser.