Free cookie consent management tool by TermsFeed Policy Generator

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

Last change on this file since 12391 was 12146, checked in by ascheibe, 10 years ago

#2353

  • improved performance of status page
  • fixed code formatting and usings
  • simplified some expressions
File size: 2.5 KB
RevLine 
[9393]1#region License Information
2/* HeuristicLab
[12012]3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
[9393]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 {
[9434]28  public interface IOptimizedHiveDao {
[9393]29    #region Task Methods
[9397]30    Task GetTaskById(Guid task);
[9399]31    Task GetTaskByDto(DT.Task taskDto);
[9397]32    Tuple<Task, Guid?> GetTaskByIdAndLastStateLogSlaveId(Guid taskId);
[9393]33
[9397]34    IEnumerable<TaskInfoForScheduler> GetWaitingTasks(Slave slave);
35    IQueryable<DT.LightweightTask> GetLightweightTasks(Guid jobId);
[9393]36
37    void UpdateTask(Task task);
38    Task UpdateTaskState(Guid taskId, TaskState taskState, Guid? slaveId, Guid? userId, string exception);
39
[9434]40    Guid AddTask(Task task);
41    void AssignJobToResource(Guid taskId, IEnumerable<Guid> resourceIds);
42
[9397]43    bool TaskIsAllowedToBeCalculatedBySlave(Guid taskId, Guid slaveId);
[9393]44    #endregion
45
46    #region TaskData Methods
[9399]47    TaskData GetTaskDataByDto(DT.TaskData taskDataDto);
[9393]48    void UpdateTaskData(TaskData taskData);
49    #endregion
50
51    #region Plugin Methods
[9399]52    Plugin GetPluginById(Guid pluginId);
[9393]53    #endregion
54
55    #region Slave Methods
56    Slave GetSlaveById(Guid id);
57
58    void UpdateSlave(Slave slave);
[9397]59
60    bool SlaveHasToShutdownComputer(Guid slaveId);
61    bool SlaveIsAllowedToCalculate(Guid slaveId);
[9393]62    #endregion
63
64    #region Resource Methods
[9434]65    IEnumerable<Guid> GetAssignedResourceIds(Guid jobId);
[9393]66    #endregion
[12146]67
68    #region Website Methods
69
70    IEnumerable<Guid> GetAllResourceIds();
71
72    int GetNumberOfWaitingTasks();
73
74    Dictionary<Guid, int> GetCalculatingTasksByUser();
75
76    Dictionary<Guid, int> GetWaitingTasksByUser();
77
78    #endregion
[9393]79  }
80}
Note: See TracBrowser for help on using the repository browser.