[4593] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
[5375] | 3 | using System.Net.Security;
|
---|
[4593] | 4 | using System.ServiceModel;
|
---|
| 5 | using HeuristicLab.Services.Hive.Common.DataTransfer;
|
---|
| 6 |
|
---|
| 7 | namespace HeuristicLab.Services.Hive.Common.ServiceContracts {
|
---|
[4629] | 8 |
|
---|
| 9 | [ServiceContract(ProtectionLevel = ProtectionLevel.EncryptAndSign)]
|
---|
[4593] | 10 | public interface IHiveService {
|
---|
| 11 |
|
---|
| 12 | #region Job Methods
|
---|
| 13 | [OperationContract]
|
---|
[5511] | 14 | Guid AddJob(Job job, JobData jobData, IEnumerable<Guid> resourceIds);
|
---|
[4598] | 15 |
|
---|
[4593] | 16 | [OperationContract]
|
---|
[4905] | 17 | Guid AddChildJob(Guid parentJobId, Job job, JobData jobData);
|
---|
[4598] | 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 |
|
---|
[4593] | 34 | [OperationContract]
|
---|
[5511] | 35 | void UpdateJob(Job jobDto);
|
---|
[5602] | 36 |
|
---|
[5511] | 37 | [OperationContract]
|
---|
| 38 | void UpdateJobData(Job jobDto, JobData jobDataDto);
|
---|
[4598] | 39 |
|
---|
[4593] | 40 | [OperationContract]
|
---|
[5106] | 41 | void DeleteJob(Guid jobId);
|
---|
| 42 |
|
---|
| 43 | [OperationContract]
|
---|
[4598] | 44 | void DeleteChildJobs(Guid parentJobId);
|
---|
[5636] | 45 |
|
---|
| 46 | [OperationContract]
|
---|
| 47 | Job UpdateJobState(Guid jobId, JobState jobState, Guid? slaveId, Guid? userId, string exception);
|
---|
[4598] | 48 | #endregion
|
---|
| 49 |
|
---|
| 50 | #region Job Control Methods
|
---|
[4593] | 51 | [OperationContract]
|
---|
[5053] | 52 | void StopJob(Guid jobId);
|
---|
[4598] | 53 |
|
---|
| 54 | [OperationContract]
|
---|
[5062] | 55 | void PauseJob(Guid jobId);
|
---|
[5779] | 56 |
|
---|
| 57 | [OperationContract]
|
---|
| 58 | void RestartJob(Guid jobId);
|
---|
[4593] | 59 | #endregion
|
---|
| 60 |
|
---|
| 61 | #region HiveExperiment Methods
|
---|
[4629] | 62 | [OperationContract]
|
---|
| 63 | HiveExperiment GetHiveExperiment(Guid id);
|
---|
| 64 |
|
---|
[4593] | 65 | /// <summary>
|
---|
| 66 | /// Returns all experiments for the current user
|
---|
| 67 | /// </summary>
|
---|
| 68 | [OperationContract]
|
---|
| 69 | IEnumerable<HiveExperiment> GetHiveExperiments();
|
---|
[4598] | 70 |
|
---|
[5602] | 71 | /// <summary>
|
---|
| 72 | /// Returns all experiments in the hive (only for admins)
|
---|
| 73 | /// </summary>
|
---|
| 74 | /// <returns></returns>
|
---|
[4593] | 75 | [OperationContract]
|
---|
[5602] | 76 | IEnumerable<HiveExperiment> GetAllHiveExperiments();
|
---|
| 77 |
|
---|
| 78 | [OperationContract]
|
---|
[4629] | 79 | Guid AddHiveExperiment(HiveExperiment hiveExperimentDto);
|
---|
| 80 |
|
---|
| 81 | [OperationContract]
|
---|
[4598] | 82 | void UpdateHiveExperiment(HiveExperiment hiveExperimentDto);
|
---|
| 83 |
|
---|
[4593] | 84 | [OperationContract]
|
---|
| 85 | void DeleteHiveExperiment(Guid hiveExperimentId);
|
---|
| 86 | #endregion
|
---|
| 87 |
|
---|
| 88 | #region Login Methods
|
---|
[5053] | 89 | [OperationContract]
|
---|
[5405] | 90 | void Hello(Slave slave);
|
---|
[5053] | 91 |
|
---|
| 92 | [OperationContract]
|
---|
[5375] | 93 | void GoodBye(Guid slaveId);
|
---|
[4593] | 94 | #endregion
|
---|
| 95 |
|
---|
| 96 | #region Heartbeat Methods
|
---|
| 97 | [OperationContract]
|
---|
[5053] | 98 | List<MessageContainer> Heartbeat(Heartbeat heartbeat);
|
---|
[4593] | 99 | #endregion
|
---|
| 100 |
|
---|
| 101 | #region Plugin Methods
|
---|
| 102 | [OperationContract]
|
---|
[4905] | 103 | Guid AddPlugin(Plugin plugin, List<PluginData> pluginData);
|
---|
[4593] | 104 | [OperationContract]
|
---|
[5053] | 105 | IEnumerable<Plugin> GetPlugins();
|
---|
[4593] | 106 | [OperationContract]
|
---|
[5053] | 107 | IEnumerable<PluginData> GetPluginDatas(List<Guid> pluginIds);
|
---|
[4593] | 108 | #endregion
|
---|
[5375] | 109 |
|
---|
[4593] | 110 | #region Slave Methods
|
---|
| 111 | [OperationContract]
|
---|
[4649] | 112 | Guid AddSlave(Slave slave);
|
---|
| 113 |
|
---|
| 114 | [OperationContract]
|
---|
[4598] | 115 | Guid AddSlaveGroup(SlaveGroup slaveGroup);
|
---|
| 116 |
|
---|
[4593] | 117 | [OperationContract]
|
---|
[5106] | 118 | Slave GetSlave(Guid slaveId);
|
---|
| 119 |
|
---|
| 120 | [OperationContract]
|
---|
| 121 | SlaveGroup GetSlaveGroup(Guid slaveGroupId);
|
---|
| 122 |
|
---|
| 123 | [OperationContract]
|
---|
[4598] | 124 | IEnumerable<Slave> GetSlaves();
|
---|
[5106] | 125 |
|
---|
[4593] | 126 | [OperationContract]
|
---|
[4598] | 127 | IEnumerable<SlaveGroup> GetSlaveGroups();
|
---|
| 128 |
|
---|
[4593] | 129 | [OperationContract]
|
---|
[5106] | 130 | void UpdateSlave(Slave slave);
|
---|
[4598] | 131 |
|
---|
[4593] | 132 | [OperationContract]
|
---|
[5106] | 133 | void UpdateSlaveGroup(SlaveGroup slaveGroup);
|
---|
[4598] | 134 |
|
---|
[4593] | 135 | [OperationContract]
|
---|
[5106] | 136 | void DeleteSlave(Guid slaveId);
|
---|
| 137 |
|
---|
| 138 | [OperationContract]
|
---|
| 139 | void DeleteSlaveGroup(Guid slaveGroupId);
|
---|
| 140 |
|
---|
| 141 | [OperationContract]
|
---|
| 142 | void AddResourceToGroup(Guid slaveGroupId, Guid resourceId);
|
---|
| 143 |
|
---|
| 144 | [OperationContract]
|
---|
[4598] | 145 | void RemoveResourceFromGroup(Guid slaveGroupId, Guid resourceId);
|
---|
[4629] | 146 |
|
---|
[5458] | 147 | [OperationContract]
|
---|
| 148 | Guid GetResourceId(string resourceName);
|
---|
| 149 |
|
---|
[5593] | 150 | [OperationContract]
|
---|
[5636] | 151 | void TriggerLifecycle(bool force);
|
---|
[4593] | 152 | #endregion
|
---|
[5101] | 153 |
|
---|
[5633] | 154 | #region Appointment Methods
|
---|
| 155 | [OperationContract]
|
---|
| 156 | Guid AddAppointment(Appointment appointment);
|
---|
| 157 |
|
---|
| 158 | [OperationContract]
|
---|
| 159 | void DeleteAppointment(Guid appointmentId);
|
---|
| 160 |
|
---|
| 161 | [OperationContract]
|
---|
| 162 | void UpdateAppointment(Appointment appointment);
|
---|
| 163 |
|
---|
| 164 | [OperationContract]
|
---|
| 165 | IEnumerable<Appointment> GetScheduleForResource(Guid resourceId);
|
---|
| 166 | #endregion
|
---|
[4593] | 167 | }
|
---|
| 168 | }
|
---|