1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Net.Security;
|
---|
4 | using System.ServiceModel;
|
---|
5 | using HeuristicLab.Services.Hive.Common.DataTransfer;
|
---|
6 |
|
---|
7 | namespace 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> slaveGroupIds);
|
---|
15 |
|
---|
16 | [OperationContract]
|
---|
17 | Guid AddChildJob(Guid parentJobId, Job job, JobData jobData);
|
---|
18 |
|
---|
19 | [OperationContract] // formerly GetJobById
|
---|
20 | Job GetJob(Guid jobId);
|
---|
21 |
|
---|
22 | [OperationContract] // formerly GetAllJobs
|
---|
23 | IEnumerable<Job> GetJobs();
|
---|
24 |
|
---|
25 | [OperationContract] // formerly GetJobResults
|
---|
26 | IEnumerable<LightweightJob> GetLightweightJobs(IEnumerable<Guid> jobIds);
|
---|
27 |
|
---|
28 | [OperationContract] // formerly GetChildJobResults
|
---|
29 | IEnumerable<LightweightJob> GetLightweightChildJobs(Guid? parentJobId, bool recursive, bool includeParent);
|
---|
30 |
|
---|
31 | [OperationContract] // formerly GetLastSerializedResult
|
---|
32 | JobData GetJobData(Guid jobId);
|
---|
33 |
|
---|
34 | [OperationContract]
|
---|
35 | void UpdateJob(Job jobDto, JobData jobDataDto);
|
---|
36 |
|
---|
37 | [OperationContract]
|
---|
38 | void DeleteJob(Guid jobId);
|
---|
39 |
|
---|
40 | [OperationContract]
|
---|
41 | void DeleteChildJobs(Guid parentJobId);
|
---|
42 |
|
---|
43 | [OperationContract]
|
---|
44 | PluginData GetConfigurationFile();
|
---|
45 |
|
---|
46 | #endregion
|
---|
47 |
|
---|
48 | #region Job Control Methods
|
---|
49 | [OperationContract]
|
---|
50 | void StopJob(Guid jobId);
|
---|
51 |
|
---|
52 | [OperationContract]
|
---|
53 | void PauseJob(Guid jobId);
|
---|
54 | #endregion
|
---|
55 |
|
---|
56 | #region HiveExperiment Methods
|
---|
57 | [OperationContract]
|
---|
58 | HiveExperiment GetHiveExperiment(Guid id);
|
---|
59 |
|
---|
60 | /// <summary>
|
---|
61 | /// Returns all experiments for the current user
|
---|
62 | /// </summary>
|
---|
63 | [OperationContract]
|
---|
64 | IEnumerable<HiveExperiment> GetHiveExperiments();
|
---|
65 |
|
---|
66 | [OperationContract]
|
---|
67 | Guid AddHiveExperiment(HiveExperiment hiveExperimentDto);
|
---|
68 |
|
---|
69 | [OperationContract]
|
---|
70 | void UpdateHiveExperiment(HiveExperiment hiveExperimentDto);
|
---|
71 |
|
---|
72 | [OperationContract]
|
---|
73 | void DeleteHiveExperiment(Guid hiveExperimentId);
|
---|
74 | #endregion
|
---|
75 |
|
---|
76 | #region Login Methods
|
---|
77 | [OperationContract]
|
---|
78 | void Hello(Slave slave);
|
---|
79 |
|
---|
80 | [OperationContract]
|
---|
81 | void GoodBye(Guid slaveId);
|
---|
82 | #endregion
|
---|
83 |
|
---|
84 | #region Heartbeat Methods
|
---|
85 | [OperationContract]
|
---|
86 | List<MessageContainer> Heartbeat(Heartbeat heartbeat);
|
---|
87 | #endregion
|
---|
88 |
|
---|
89 | #region Plugin Methods
|
---|
90 | [OperationContract]
|
---|
91 | Guid AddPlugin(Plugin plugin, List<PluginData> pluginData);
|
---|
92 | [OperationContract]
|
---|
93 | IEnumerable<Plugin> GetPlugins();
|
---|
94 | [OperationContract]
|
---|
95 | IEnumerable<PluginData> GetPluginDatas(List<Guid> pluginIds);
|
---|
96 | #endregion
|
---|
97 |
|
---|
98 | #region Slave Methods
|
---|
99 | [OperationContract]
|
---|
100 | Guid AddSlave(Slave slave);
|
---|
101 |
|
---|
102 | [OperationContract]
|
---|
103 | Guid AddSlaveGroup(SlaveGroup slaveGroup);
|
---|
104 |
|
---|
105 | [OperationContract]
|
---|
106 | Slave GetSlave(Guid slaveId);
|
---|
107 |
|
---|
108 | [OperationContract]
|
---|
109 | SlaveGroup GetSlaveGroup(Guid slaveGroupId);
|
---|
110 |
|
---|
111 | [OperationContract]
|
---|
112 | IEnumerable<Slave> GetSlaves();
|
---|
113 |
|
---|
114 | [OperationContract]
|
---|
115 | IEnumerable<SlaveGroup> GetSlaveGroups();
|
---|
116 |
|
---|
117 | [OperationContract]
|
---|
118 | void UpdateSlave(Slave slave);
|
---|
119 |
|
---|
120 | [OperationContract]
|
---|
121 | void UpdateSlaveGroup(SlaveGroup slaveGroup);
|
---|
122 |
|
---|
123 | [OperationContract]
|
---|
124 | void DeleteSlave(Guid slaveId);
|
---|
125 |
|
---|
126 | [OperationContract]
|
---|
127 | void DeleteSlaveGroup(Guid slaveGroupId);
|
---|
128 |
|
---|
129 | [OperationContract]
|
---|
130 | void AddResourceToGroup(Guid slaveGroupId, Guid resourceId);
|
---|
131 |
|
---|
132 | [OperationContract]
|
---|
133 | void RemoveResourceFromGroup(Guid slaveGroupId, Guid resourceId);
|
---|
134 |
|
---|
135 | #endregion
|
---|
136 |
|
---|
137 | }
|
---|
138 | }
|
---|