Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/08/11 13:41:25 (13 years ago)
Author:
ascheibe
Message:

#1233 Review comments: renamed Job to Task

File:
1 copied

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.3/DataTransfer/TaskState.cs

    r6717 r6721  
    2424namespace HeuristicLab.Services.Hive.DataTransfer {
    2525  [Serializable]
    26   public enum JobState {
     26  public enum TaskState {
    2727    /// <summary>
    28     /// A job is offline as long as he is not yet submitted to the hive
     28    /// A task is offline as long as he is not yet submitted to the hive
    2929    /// </summary>
    3030    Offline,
    3131
    3232    /// <summary>
    33     /// Job is waiting to be calculated
     33    /// Task is waiting to be calculated
    3434    /// </summary>
    3535    Waiting,
    3636
    3737    /// <summary>
    38     /// Job is beeing transferred
     38    /// Task is beeing transferred
    3939    /// </summary>
    4040    Transferring,
    4141
    4242    /// <summary>
    43     /// Job is actively calculated on a Slave
     43    /// Task is actively calculated on a Slave
    4444    /// </summary>
    4545    Calculating,
    4646
    4747    /// <summary>
    48     /// Job is paused, will not be picked up by slaves
     48    /// Task is paused, will not be picked up by slaves
    4949    /// </summary>
    5050    Paused,
    5151
    5252    /// <summary>
    53     /// Job as finished and is ready to be collected by the Client
     53    /// Task as finished and is ready to be collected by the Client
    5454    /// </summary>
    5555    Finished,
    5656
    5757    /// <summary>
    58     /// Job is aborted and result can be collected by the Client
     58    /// Task is aborted and result can be collected by the Client
    5959    /// </summary>
    6060    Aborted,
    6161
    6262    /// <summary>
    63     /// Job as been aborted due to an error. Results are ready to be collected
     63    /// Task as been aborted due to an error. Results are ready to be collected
    6464    /// </summary>
    6565    Failed
    6666  };
    6767
    68   public static class JobStateExtensions {
     68  public static class TaskStateExtensions {
    6969    /// <summary>
    7070    /// This job is not yet done
    7171    /// </summary>
    72     public static bool IsActive(this JobState jobState) {
    73       return !jobState.IsDone();
     72    public static bool IsActive(this TaskState taskState) {
     73      return !taskState.IsDone();
    7474    }
    7575
     
    7777    /// This job is Waiting
    7878    /// </summary>
    79     public static bool IsWaiting(this JobState jobState) {
    80       return jobState == JobState.Waiting;
     79    public static bool IsWaiting(this TaskState taskState) {
     80      return taskState == TaskState.Waiting;
    8181    }
    8282
     
    8484    /// This job is Finished || Failed || Aborted
    8585    /// </summary>
    86     public static bool IsDone(this JobState jobState) {
    87       return jobState == JobState.Finished ||
    88         jobState == JobState.Aborted ||
    89         jobState == JobState.Failed;
     86    public static bool IsDone(this TaskState taskState) {
     87      return taskState == TaskState.Finished ||
     88        taskState == TaskState.Aborted ||
     89        taskState == TaskState.Failed;
    9090    }
    9191  }
Note: See TracChangeset for help on using the changeset viewer.