Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.Hive.Server.DataAccess/3.2/IJobAdapter.cs @ 2584

Last change on this file since 2584 was 2117, checked in by svonolfe, 15 years ago

Streaming of Jobs and JobsResults directly from/to the DB (#680)

File size: 3.4 KB
RevLine 
[1377]1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2008 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.Text;
25using HeuristicLab.Hive.Contracts.BusinessObjects;
26using HeuristicLab.DataAccess.Interfaces;
[2117]27using System.IO;
[1377]28
29namespace HeuristicLab.Hive.Server.DataAccess {
30  public interface IJobAdapter: IDataAdapter<Job> {
31    /// <summary>
32    /// Gets all subjobs of the specified job
33    /// </summary>
34    /// <returns></returns>
35    ICollection<Job> GetAllSubjobs(Job job);
36
37    /// <summary>
38    /// Gets all Jobs with the specified state
39    /// </summary>
40    /// <returns></returns>
41    ICollection<Job> GetJobsByState(State state);
42
43    /// <summary>
[1497]44    /// Finds a job with the specified criterias
45    /// </summary>
46    /// <param name="state">all jobs with the specified state</param>
47    /// <param name="cores">all jobs which require less or equal cores</param>
48    /// <param name="memory">all jobs which require less or equal memory</param>
[2066]49    /// <param name="resourceId">all jobs that can be calculated by that resource</param>
[1497]50    /// <returns></returns>
[2066]51    ICollection<Job> FindJobs(State state,
52      int cores,
53      int memory,
54      Guid resourceId);
[1497]55
56    /// <summary>
[1377]57    /// Gets all jobs of the client
58    /// </summary>
59    /// <param name="client"></param>
60    /// <returns></returns>
61    ICollection<Job> GetJobsOf(ClientInfo client);
62
63    /// <summary>
64    /// Gets all active jobs of the client
65    /// </summary>
66    /// <param name="client"></param>
67    /// <returns></returns>
68    ICollection<Job> GetActiveJobsOf(ClientInfo client);
69
70    /// <summary>
71    /// Gets all jobs of the user
72    /// </summary>
73    /// <param name="user"></param>
74    /// <returns></returns>
75    ICollection<Job> GetJobsOf(Guid userId);
[1944]76
77    /// <summary>
78    /// Gets all jobs of the project
79    /// </summary>
80    /// <param name="user"></param>
81    /// <returns></returns>
82    ICollection<Job> GetJobsByProject(Guid projectId);
[2082]83
84    /// <summary>
85    /// Gets the computable job with the secified jobId
86    /// </summary>
87    /// <param name="jobId"></param>
88    /// <returns></returns>
[2099]89    SerializedJob GetSerializedJob(Guid jobId);
[2082]90
91    /// <summary>
[2117]92    /// Gets a stream object for the large serialized job data
93    /// </summary>
94    /// <param name="jobId"></param>
95    /// <returns></returns>
96    Stream GetSerializedJobStream(Guid jobId, bool useExistingConnection);
97
98    /// <summary>
[2082]99    /// Saves or update the computable job
100    /// </summary>
101    /// <param name="jobId"></param>
[2099]102    void UpdateSerializedJob(SerializedJob job);
[1377]103  }
104}
Note: See TracBrowser for help on using the repository browser.