Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/ServiceContracts/IHiveService.cs @ 6431

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

#1233

  • changed Log to ThreadSafeLog
  • added license information to all files
  • added assembly descriptions
  • using blocks before namespace
  • made TransactionManager static
  • removed DaoException
  • removed TimeSpanExtensions
  • renamed prepareHiveDatabase.sql should be renamed to Prepare Hive Database.sql
  • created Initialize Hive Database.sql
File size: 5.5 KB
Line 
1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2011 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.Net.Security;
25using System.ServiceModel;
26using HeuristicLab.Services.Hive.Common.DataTransfer;
27
28namespace HeuristicLab.Services.Hive.Common.ServiceContracts {
29
30  [ServiceContract(ProtectionLevel = ProtectionLevel.EncryptAndSign)]
31  public interface IHiveService {
32
33    #region Job Methods
34    [OperationContract]
35    Guid AddJob(Job job, JobData jobData, IEnumerable<Guid> resourceIds);
36
37    [OperationContract]
38    Guid AddChildJob(Guid parentJobId, Job job, JobData jobData);
39
40    [OperationContract]
41    Job GetJob(Guid jobId);
42
43    [OperationContract]
44    IEnumerable<Job> GetJobs();
45
46    [OperationContract]
47    IEnumerable<LightweightJob> GetLightweightJobs(IEnumerable<Guid> jobIds);
48
49    [OperationContract]
50    IEnumerable<LightweightJob> GetLightweightChildJobs(Guid? parentJobId, bool recursive, bool includeParent);
51
52    [OperationContract]
53    IEnumerable<LightweightJob> GetLightweightExperimentJobs(Guid experimentId);
54
55    [OperationContract]
56    JobData GetJobData(Guid jobId);
57
58    [OperationContract]
59    void UpdateJob(Job jobDto);
60
61    [OperationContract]
62    void UpdateJobData(Job jobDto, JobData jobDataDto);
63
64    [OperationContract]
65    void DeleteJob(Guid jobId);
66
67    [OperationContract]
68    void DeleteChildJobs(Guid parentJobId);
69
70    [OperationContract]
71    Job UpdateJobState(Guid jobId, JobState jobState, Guid? slaveId, Guid? userId, string exception);
72    #endregion
73
74    #region Job Control Methods
75    [OperationContract]
76    void StopJob(Guid jobId);
77
78    [OperationContract]
79    void PauseJob(Guid jobId);
80
81    [OperationContract]
82    void RestartJob(Guid jobId);
83    #endregion
84
85    #region HiveExperiment Methods
86    [OperationContract]
87    HiveExperiment GetHiveExperiment(Guid id);
88
89    /// <summary>
90    /// Returns all experiments for the current user
91    /// </summary>
92    [OperationContract]
93    IEnumerable<HiveExperiment> GetHiveExperiments();
94
95    /// <summary>
96    /// Returns all experiments in the hive (only for admins)
97    /// </summary>
98    /// <returns></returns>
99    [OperationContract]
100    IEnumerable<HiveExperiment> GetAllHiveExperiments();
101
102    [OperationContract]
103    Guid AddHiveExperiment(HiveExperiment hiveExperimentDto);
104
105    [OperationContract]
106    void UpdateHiveExperiment(HiveExperiment hiveExperimentDto);
107
108    [OperationContract]
109    void DeleteHiveExperiment(Guid hiveExperimentId);
110    #endregion
111
112    #region Login Methods
113    [OperationContract]
114    void Hello(Slave slave);
115
116    [OperationContract]
117    void GoodBye(Guid slaveId);
118    #endregion
119
120    #region Heartbeat Methods
121    [OperationContract]
122    List<MessageContainer> Heartbeat(Heartbeat heartbeat);
123    #endregion
124
125    #region Plugin Methods
126    [OperationContract]
127    Plugin GetPlugin(Guid pluginId);
128    [OperationContract]
129    [FaultContract(typeof(PluginAlreadyExistsFault))]
130    Guid AddPlugin(Plugin plugin, List<PluginData> pluginData);
131    [OperationContract]
132    IEnumerable<Plugin> GetPlugins();
133    [OperationContract]
134    IEnumerable<PluginData> GetPluginDatas(List<Guid> pluginIds);
135    #endregion
136
137    #region Slave Methods
138    [OperationContract]
139    Guid AddSlave(Slave slave);
140
141    [OperationContract]
142    Guid AddSlaveGroup(SlaveGroup slaveGroup);
143
144    [OperationContract]
145    Slave GetSlave(Guid slaveId);
146
147    [OperationContract]
148    SlaveGroup GetSlaveGroup(Guid slaveGroupId);
149
150    [OperationContract]
151    IEnumerable<Slave> GetSlaves();
152
153    [OperationContract]
154    IEnumerable<SlaveGroup> GetSlaveGroups();
155
156    [OperationContract]
157    void UpdateSlave(Slave slave);
158
159    [OperationContract]
160    void UpdateSlaveGroup(SlaveGroup slaveGroup);
161
162    [OperationContract]
163    void DeleteSlave(Guid slaveId);
164
165    [OperationContract]
166    void DeleteSlaveGroup(Guid slaveGroupId);
167
168    [OperationContract]
169    void AddResourceToGroup(Guid slaveGroupId, Guid resourceId);
170
171    [OperationContract]
172    void RemoveResourceFromGroup(Guid slaveGroupId, Guid resourceId);
173
174    [OperationContract]
175    Guid GetResourceId(string resourceName);
176
177    [OperationContract]
178    IEnumerable<Job> GetJobsByResourceId(Guid resourceId);
179
180    [OperationContract]
181    void TriggerLifecycle(bool force);
182    #endregion
183
184    #region Appointment Methods
185    [OperationContract]
186    Guid AddAppointment(Appointment appointment);
187
188    [OperationContract]
189    void DeleteAppointment(Guid appointmentId);
190
191    [OperationContract]
192    void UpdateAppointment(Appointment appointment);
193
194    [OperationContract]
195    IEnumerable<Appointment> GetScheduleForResource(Guid resourceId);
196    #endregion
197  }
198}
Note: See TracBrowser for help on using the repository browser.