Changeset 6721 for branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.3/DataTransfer/TaskState.cs
- Timestamp:
- 09/08/11 13:41:25 (13 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.3/DataTransfer/TaskState.cs
r6717 r6721 24 24 namespace HeuristicLab.Services.Hive.DataTransfer { 25 25 [Serializable] 26 public enum JobState {26 public enum TaskState { 27 27 /// <summary> 28 /// A jobis offline as long as he is not yet submitted to the hive28 /// A task is offline as long as he is not yet submitted to the hive 29 29 /// </summary> 30 30 Offline, 31 31 32 32 /// <summary> 33 /// Jobis waiting to be calculated33 /// Task is waiting to be calculated 34 34 /// </summary> 35 35 Waiting, 36 36 37 37 /// <summary> 38 /// Jobis beeing transferred38 /// Task is beeing transferred 39 39 /// </summary> 40 40 Transferring, 41 41 42 42 /// <summary> 43 /// Jobis actively calculated on a Slave43 /// Task is actively calculated on a Slave 44 44 /// </summary> 45 45 Calculating, 46 46 47 47 /// <summary> 48 /// Jobis paused, will not be picked up by slaves48 /// Task is paused, will not be picked up by slaves 49 49 /// </summary> 50 50 Paused, 51 51 52 52 /// <summary> 53 /// Jobas finished and is ready to be collected by the Client53 /// Task as finished and is ready to be collected by the Client 54 54 /// </summary> 55 55 Finished, 56 56 57 57 /// <summary> 58 /// Jobis aborted and result can be collected by the Client58 /// Task is aborted and result can be collected by the Client 59 59 /// </summary> 60 60 Aborted, 61 61 62 62 /// <summary> 63 /// Jobas been aborted due to an error. Results are ready to be collected63 /// Task as been aborted due to an error. Results are ready to be collected 64 64 /// </summary> 65 65 Failed 66 66 }; 67 67 68 public static class JobStateExtensions {68 public static class TaskStateExtensions { 69 69 /// <summary> 70 70 /// This job is not yet done 71 71 /// </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(); 74 74 } 75 75 … … 77 77 /// This job is Waiting 78 78 /// </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; 81 81 } 82 82 … … 84 84 /// This job is Finished || Failed || Aborted 85 85 /// </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; 90 90 } 91 91 }
Note: See TracChangeset
for help on using the changeset viewer.