Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IJobDao.cs @ 5179

Last change on this file since 5179 was 5179, checked in by cneumuel, 14 years ago

#1260

  • migrated to .NET 4.0
  • moved state-information about heartbeat timestamps into DB to reduce IIS-recycling issues
  • optimized memory usage of ExperimentManager when lots of large jobs are downloaded
File size: 2.2 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 System.IO;
25using HeuristicLab.Hive.Contracts.BusinessObjects;
26
27namespace HeuristicLab.Hive.Server.DataAccess {
28  public interface IJobDao: IGenericDao<JobDto> {
29    IEnumerable<JobDto> FindActiveJobsOfSlave(SlaveDto slave);
30
31    IEnumerable<JobDto> GetJobsByState(JobState state);
32
33    void AssignSlaveToJob(Guid slaveId, Guid jobId);
34
35    void UnAssignSlaveToJob(Guid jobId);
36
37    void SetJobOffline(JobDto job);
38
39    SerializedJob InsertWithAttachedJob(SerializedJob job);
40
41    byte[] GetBinaryJobFile(Guid jobId);
42
43    IEnumerable<JobDto> FindFittingJobs(JobState state, int freeCores, int freeMemory, Guid slaveGuid);
44
45    Stream GetSerializedJobStream(Guid jobId);
46
47    IEnumerable<JobDto> FindWithLimitations(JobState jobState, int offset, int count);
48
49    void SetBinaryJobFile(Guid jobId, byte[] data);
50
51    IEnumerable<JobDto> FindJobsById(IEnumerable<Guid> jobIds);
52
53    bool IsUserAuthorizedForJobs(Guid userId, params Guid[] jobIds);
54
55    IEnumerable<JobDto> FindJobsByParentId(Guid? parentJobId, bool recursive);
56
57    /// <summary>
58    /// Returns a list of jobs which are on state WaitForChildJobs and those child-jobs are finished
59    /// </summary>
60    IEnumerable<JobDto> FindJobsWithFinishedChilds(Guid guid);
61
62    IEnumerable<JobDto> FindTimeoutJobs();
63  }
64}
Note: See TracBrowser for help on using the repository browser.