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> resourceIds);
|
---|
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);
|
---|
36 |
|
---|
37 | [OperationContract]
|
---|
38 | void UpdateJobData(Job jobDto, JobData jobDataDto);
|
---|
39 |
|
---|
40 | [OperationContract]
|
---|
41 | void DeleteJob(Guid jobId);
|
---|
42 |
|
---|
43 | [OperationContract]
|
---|
44 | void DeleteChildJobs(Guid parentJobId);
|
---|
45 | #endregion
|
---|
46 |
|
---|
47 | #region Job Control Methods
|
---|
48 | [OperationContract]
|
---|
49 | void StopJob(Guid jobId);
|
---|
50 |
|
---|
51 | [OperationContract]
|
---|
52 | void PauseJob(Guid jobId);
|
---|
53 | #endregion
|
---|
54 |
|
---|
55 | #region HiveExperiment Methods
|
---|
56 | [OperationContract]
|
---|
57 | HiveExperiment GetHiveExperiment(Guid id);
|
---|
58 |
|
---|
59 | /// <summary>
|
---|
60 | /// Returns all experiments for the current user
|
---|
61 | /// </summary>
|
---|
62 | [OperationContract]
|
---|
63 | IEnumerable<HiveExperiment> GetHiveExperiments();
|
---|
64 |
|
---|
65 | [OperationContract]
|
---|
66 | Guid AddHiveExperiment(HiveExperiment hiveExperimentDto);
|
---|
67 |
|
---|
68 | [OperationContract]
|
---|
69 | void UpdateHiveExperiment(HiveExperiment hiveExperimentDto);
|
---|
70 |
|
---|
71 | [OperationContract]
|
---|
72 | void DeleteHiveExperiment(Guid hiveExperimentId);
|
---|
73 | #endregion
|
---|
74 |
|
---|
75 | #region Login Methods
|
---|
76 | [OperationContract]
|
---|
77 | void Hello(Slave slave);
|
---|
78 |
|
---|
79 | [OperationContract]
|
---|
80 | void GoodBye(Guid slaveId);
|
---|
81 | #endregion
|
---|
82 |
|
---|
83 | #region Heartbeat Methods
|
---|
84 | [OperationContract]
|
---|
85 | List<MessageContainer> Heartbeat(Heartbeat heartbeat);
|
---|
86 | #endregion
|
---|
87 |
|
---|
88 | #region Plugin Methods
|
---|
89 | [OperationContract]
|
---|
90 | Guid AddPlugin(Plugin plugin, List<PluginData> pluginData);
|
---|
91 | [OperationContract]
|
---|
92 | IEnumerable<Plugin> GetPlugins();
|
---|
93 | [OperationContract]
|
---|
94 | IEnumerable<PluginData> GetPluginDatas(List<Guid> pluginIds);
|
---|
95 | #endregion
|
---|
96 |
|
---|
97 | #region Slave Methods
|
---|
98 | [OperationContract]
|
---|
99 | Guid AddSlave(Slave slave);
|
---|
100 |
|
---|
101 | [OperationContract]
|
---|
102 | Guid AddSlaveGroup(SlaveGroup slaveGroup);
|
---|
103 |
|
---|
104 | [OperationContract]
|
---|
105 | Slave GetSlave(Guid slaveId);
|
---|
106 |
|
---|
107 | [OperationContract]
|
---|
108 | SlaveGroup GetSlaveGroup(Guid slaveGroupId);
|
---|
109 |
|
---|
110 | [OperationContract]
|
---|
111 | IEnumerable<Slave> GetSlaves();
|
---|
112 |
|
---|
113 | [OperationContract]
|
---|
114 | IEnumerable<SlaveGroup> GetSlaveGroups();
|
---|
115 |
|
---|
116 | [OperationContract]
|
---|
117 | void UpdateSlave(Slave slave);
|
---|
118 |
|
---|
119 | [OperationContract]
|
---|
120 | void UpdateSlaveGroup(SlaveGroup slaveGroup);
|
---|
121 |
|
---|
122 | [OperationContract]
|
---|
123 | void DeleteSlave(Guid slaveId);
|
---|
124 |
|
---|
125 | [OperationContract]
|
---|
126 | void DeleteSlaveGroup(Guid slaveGroupId);
|
---|
127 |
|
---|
128 | [OperationContract]
|
---|
129 | void AddResourceToGroup(Guid slaveGroupId, Guid resourceId);
|
---|
130 |
|
---|
131 | [OperationContract]
|
---|
132 | void RemoveResourceFromGroup(Guid slaveGroupId, Guid resourceId);
|
---|
133 |
|
---|
134 | [OperationContract]
|
---|
135 | Guid GetResourceId(string resourceName);
|
---|
136 |
|
---|
137 | [OperationContract]
|
---|
138 | void TriggerLifecycle();
|
---|
139 | #endregion
|
---|
140 |
|
---|
141 | }
|
---|
142 | }
|
---|