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 @ 6006

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

#1233

  • changed relationship between Job and HiveExperiment. There is no more HiveExperiment.RootJobId, instead there is Job.HiveExperimentId.
  • One HiveExperiment can now have multiple Experiments.
  • TreeView supports multiple root nodes
  • HiveEngine creates a HiveExperiment for each set of jobs, so jobs cannot be without an parent experiment anymore (no more loose jobs)
  • updated ExperimentManager binaries
File size: 4.6 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Net.Security;
4using System.ServiceModel;
5using HeuristicLab.Services.Hive.Common.DataTransfer;
6
7namespace HeuristicLab.Services.Hive.Common.ServiceContracts {
8
9  [ServiceContract(ProtectionLevel = ProtectionLevel.EncryptAndSign)]
10  public interface IHiveService {
11
12    #region Job Methods
13    [OperationContract]
14    Guid AddJob(Job job, JobData jobData, IEnumerable<Guid> resourceIds);
15
16    [OperationContract]
17    Guid AddChildJob(Guid parentJobId, Job job, JobData jobData);
18
19    [OperationContract]
20    Job GetJob(Guid jobId);
21
22    [OperationContract]
23    IEnumerable<Job> GetJobs();
24
25    [OperationContract]
26    IEnumerable<LightweightJob> GetLightweightJobs(IEnumerable<Guid> jobIds);
27
28    [OperationContract]
29    IEnumerable<LightweightJob> GetLightweightChildJobs(Guid? parentJobId, bool recursive, bool includeParent);
30
31    [OperationContract]
32    IEnumerable<LightweightJob> GetLightweightExperimentJobs(Guid experimentId);
33
34    [OperationContract]
35    JobData GetJobData(Guid jobId);
36
37    [OperationContract]
38    void UpdateJob(Job jobDto);
39
40    [OperationContract]
41    void UpdateJobData(Job jobDto, JobData jobDataDto);
42
43    [OperationContract]
44    void DeleteJob(Guid jobId);
45
46    [OperationContract]
47    void DeleteChildJobs(Guid parentJobId);
48
49    [OperationContract]
50    Job UpdateJobState(Guid jobId, JobState jobState, Guid? slaveId, Guid? userId, string exception);
51    #endregion
52
53    #region Job Control Methods
54    [OperationContract]
55    void StopJob(Guid jobId);
56
57    [OperationContract]
58    void PauseJob(Guid jobId);
59
60    [OperationContract]
61    void RestartJob(Guid jobId);
62    #endregion
63
64    #region HiveExperiment Methods
65    [OperationContract]
66    HiveExperiment GetHiveExperiment(Guid id);
67
68    /// <summary>
69    /// Returns all experiments for the current user
70    /// </summary>
71    [OperationContract]
72    IEnumerable<HiveExperiment> GetHiveExperiments();
73
74    /// <summary>
75    /// Returns all experiments in the hive (only for admins)
76    /// </summary>
77    /// <returns></returns>
78    [OperationContract]
79    IEnumerable<HiveExperiment> GetAllHiveExperiments();
80
81    [OperationContract]
82    Guid AddHiveExperiment(HiveExperiment hiveExperimentDto);
83
84    [OperationContract]
85    void UpdateHiveExperiment(HiveExperiment hiveExperimentDto);
86
87    [OperationContract]
88    void DeleteHiveExperiment(Guid hiveExperimentId);
89    #endregion
90
91    #region Login Methods
92    [OperationContract]
93    void Hello(Slave slave);
94
95    [OperationContract]
96    void GoodBye(Guid slaveId);
97    #endregion
98
99    #region Heartbeat Methods
100    [OperationContract]
101    List<MessageContainer> Heartbeat(Heartbeat heartbeat);
102    #endregion
103
104    #region Plugin Methods
105    [OperationContract]
106    Plugin GetPlugin(Guid pluginId);
107    [OperationContract]
108    [FaultContract(typeof(PluginAlreadyExistsFault))]
109    Guid AddPlugin(Plugin plugin, List<PluginData> pluginData);
110    [OperationContract]
111    IEnumerable<Plugin> GetPlugins();
112    [OperationContract]
113    IEnumerable<PluginData> GetPluginDatas(List<Guid> pluginIds);
114    #endregion
115
116    #region Slave Methods
117    [OperationContract]
118    Guid AddSlave(Slave slave);
119
120    [OperationContract]
121    Guid AddSlaveGroup(SlaveGroup slaveGroup);
122
123    [OperationContract]
124    Slave GetSlave(Guid slaveId);
125
126    [OperationContract]
127    SlaveGroup GetSlaveGroup(Guid slaveGroupId);
128
129    [OperationContract]
130    IEnumerable<Slave> GetSlaves();
131
132    [OperationContract]
133    IEnumerable<SlaveGroup> GetSlaveGroups();
134
135    [OperationContract]
136    void UpdateSlave(Slave slave);
137
138    [OperationContract]
139    void UpdateSlaveGroup(SlaveGroup slaveGroup);
140
141    [OperationContract]
142    void DeleteSlave(Guid slaveId);
143
144    [OperationContract]
145    void DeleteSlaveGroup(Guid slaveGroupId);
146
147    [OperationContract]
148    void AddResourceToGroup(Guid slaveGroupId, Guid resourceId);
149
150    [OperationContract]
151    void RemoveResourceFromGroup(Guid slaveGroupId, Guid resourceId);
152
153    [OperationContract]
154    Guid GetResourceId(string resourceName);
155
156    [OperationContract]
157    void TriggerLifecycle(bool force);
158    #endregion
159
160    #region Appointment Methods
161    [OperationContract]
162    Guid AddAppointment(Appointment appointment);
163
164    [OperationContract]
165    void DeleteAppointment(Guid appointmentId);
166
167    [OperationContract]
168    void UpdateAppointment(Appointment appointment);
169
170    [OperationContract]
171    IEnumerable<Appointment> GetScheduleForResource(Guid resourceId);
172    #endregion
173  }
174}
Note: See TracBrowser for help on using the repository browser.