Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.Services.Hive/3.3/Interfaces/IOptimizedHiveDao.cs @ 11210

Last change on this file since 11210 was 11171, checked in by ascheibe, 10 years ago

#2115 merged r11170 (copyright update) into trunk

File size: 2.3 KB
Line 
1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2014 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.Linq;
25using HeuristicLab.Services.Hive.DataAccess;
26using DT = HeuristicLab.Services.Hive.DataTransfer;
27namespace HeuristicLab.Services.Hive {
28  public interface IOptimizedHiveDao {
29    #region Task Methods
30    Task GetTaskById(Guid task);
31    Task GetTaskByDto(DT.Task taskDto);
32    Tuple<Task, Guid?> GetTaskByIdAndLastStateLogSlaveId(Guid taskId);
33
34    IEnumerable<TaskInfoForScheduler> GetWaitingTasks(Slave slave);
35    IQueryable<DT.LightweightTask> GetLightweightTasks(Guid jobId);
36
37    void UpdateTask(Task task);
38    Task UpdateTaskState(Guid taskId, TaskState taskState, Guid? slaveId, Guid? userId, string exception);
39
40    Guid AddTask(Task task);
41    void AssignJobToResource(Guid taskId, IEnumerable<Guid> resourceIds);
42
43    bool TaskIsAllowedToBeCalculatedBySlave(Guid taskId, Guid slaveId);
44    #endregion
45
46    #region TaskData Methods
47    TaskData GetTaskDataByDto(DT.TaskData taskDataDto);
48    void UpdateTaskData(TaskData taskData);
49    #endregion
50
51    #region Plugin Methods
52    Plugin GetPluginById(Guid pluginId);
53    #endregion
54
55    #region Slave Methods
56    Slave GetSlaveById(Guid id);
57
58    void UpdateSlave(Slave slave);
59
60    bool SlaveHasToShutdownComputer(Guid slaveId);
61    bool SlaveIsAllowedToCalculate(Guid slaveId);
62    #endregion
63
64    #region Resource Methods
65    IEnumerable<Guid> GetAssignedResourceIds(Guid jobId);
66    #endregion
67  }
68}
Note: See TracBrowser for help on using the repository browser.