Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Hive/3.4/IJob.cs @ 6110

Last change on this file since 6110 was 6110, checked in by cneumuel, 13 years ago

#1233

  • renamed engines to executors
  • changed locking in StartJobInAppDomain
  • avoid destruction of proxy object after 5 minutes for Slave.Core
  • added JobStarted event and fixed ExecutionStateChanged and ExecutionTimeChanged
  • slaves which are moved to another slavegroup will pause their jobs now, if they must not calculate them
File size: 2.6 KB
Line 
1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
4 *
5 * This file is part of HeuristicLab.
6 *
7 * HeuristicLab is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * HeuristicLab is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
19 */
20#endregion
21
22using System;
23using System.Collections.Generic;
24using HeuristicLab.Common;
25using HeuristicLab.Core;
26
27namespace HeuristicLab.Hive {
28  public interface IJob : INamedItem {
29
30    TimeSpan ExecutionTime { get; }
31
32    ExecutionState ExecutionState { get; }
33
34    /// <summary>
35    /// indicates wether it is possible to create childjobs from this job
36    /// </summary>
37    bool IsParallelizable { get; }
38
39    /// <summary>
40    /// Configuration to indicate if this job should create child-jobs which will be executed in hive
41    /// Cannot be set true if IsParallelizable is false
42    /// </summary>
43    bool ComputeInParallel { get; set; }
44
45    /// <summary>
46    /// If this is set to true, the job should be Resumed with the child-jobs attatched instead of Started
47    /// </summary>
48    bool CollectChildJobs { get; set; }
49
50    void Prepare();
51
52    void Start();
53
54    void Pause();
55
56    void Stop();
57
58    void Resume(IEnumerable<IJob> childJobs);
59
60    event EventHandler ComputeInParallelChanged;
61
62    event EventHandler ExecutionTimeChanged;
63
64    event EventHandler ExecutionStateChanged;
65
66    event EventHandler JobFailed;
67
68    event EventHandler JobStopped;
69
70    event EventHandler JobPaused;
71
72    event EventHandler JobStarted;
73
74    /// <summary>
75    /// When this event occurs the job wants to sleep until all his child jobs are finished
76    /// </summary>
77    event EventHandler WaitForChildJobs;
78
79    /// <summary>
80    /// This event will be fired when the job wants to have a child-job to be computed
81    /// </summary>
82    event EventHandler<EventArgs<IJob>> NewChildJob;
83
84    /// <summary>
85    /// Will be fired when job wants all child-jobs to be deleted from hive
86    /// </summary>
87    event EventHandler DeleteChildJobs;
88
89
90  }
91}
Note: See TracBrowser for help on using the repository browser.