[4593] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 | using System.Linq;
|
---|
| 4 | using System.Text;
|
---|
| 5 | using System.ServiceModel;
|
---|
| 6 | using System.IO;
|
---|
| 7 | using HeuristicLab.Services.Hive.Common.DataTransfer;
|
---|
[4629] | 8 | using System.Net.Security;
|
---|
[4593] | 9 |
|
---|
| 10 | namespace HeuristicLab.Services.Hive.Common.ServiceContracts {
|
---|
[4629] | 11 |
|
---|
| 12 | [ServiceContract(ProtectionLevel = ProtectionLevel.EncryptAndSign)]
|
---|
[4593] | 13 | public interface IHiveService {
|
---|
| 14 |
|
---|
| 15 | #region Job Methods
|
---|
| 16 | [OperationContract]
|
---|
[4905] | 17 | Guid AddJob(Job job, JobData jobData);
|
---|
[4598] | 18 |
|
---|
[4593] | 19 | [OperationContract]
|
---|
[4905] | 20 | Guid AddChildJob(Guid parentJobId, Job job, JobData jobData);
|
---|
[4598] | 21 |
|
---|
| 22 | [OperationContract] // formerly GetJobById
|
---|
| 23 | Job GetJob(Guid jobId);
|
---|
| 24 |
|
---|
| 25 | [OperationContract] // formerly GetAllJobs
|
---|
| 26 | IEnumerable<Job> GetJobs();
|
---|
| 27 |
|
---|
| 28 | [OperationContract] // formerly GetJobResults
|
---|
| 29 | IEnumerable<LightweightJob> GetLightweightJobs(IEnumerable<Guid> jobIds);
|
---|
| 30 |
|
---|
| 31 | [OperationContract] // formerly GetChildJobResults
|
---|
| 32 | IEnumerable<LightweightJob> GetLightweightChildJobs(Guid? parentJobId, bool recursive, bool includeParent);
|
---|
| 33 |
|
---|
| 34 | [OperationContract] // formerly GetLastSerializedResult
|
---|
| 35 | JobData GetJobData(Guid jobId);
|
---|
| 36 |
|
---|
[4593] | 37 | [OperationContract]
|
---|
[4598] | 38 | void UpdateJob(Job jobDto, JobData jobDataDto);
|
---|
| 39 |
|
---|
[4593] | 40 | [OperationContract]
|
---|
[5106] | 41 | void DeleteJob(Guid jobId);
|
---|
| 42 |
|
---|
| 43 | [OperationContract]
|
---|
[4598] | 44 | void DeleteChildJobs(Guid parentJobId);
|
---|
| 45 |
|
---|
| 46 | [OperationContract] // new method: appropriate job is choosen and set to 'calculating'. the slave is responsible for requesting the jobData. Server should wait some timeout until he redistributes the job
|
---|
| 47 | Job AquireJob(Guid slaveId);
|
---|
[5101] | 48 |
|
---|
| 49 | [OperationContract]
|
---|
| 50 | PluginData GetConfigurationFile();
|
---|
| 51 |
|
---|
[4598] | 52 | #endregion
|
---|
| 53 |
|
---|
| 54 | #region Job Control Methods
|
---|
[4593] | 55 | [OperationContract]
|
---|
[5053] | 56 | void StopJob(Guid jobId);
|
---|
[4598] | 57 |
|
---|
| 58 | [OperationContract]
|
---|
[5062] | 59 | void PauseJob(Guid jobId);
|
---|
[4593] | 60 | #endregion
|
---|
| 61 |
|
---|
| 62 | #region HiveExperiment Methods
|
---|
[4629] | 63 | [OperationContract]
|
---|
| 64 | HiveExperiment GetHiveExperiment(Guid id);
|
---|
| 65 |
|
---|
[4593] | 66 | /// <summary>
|
---|
| 67 | /// Returns all experiments for the current user
|
---|
| 68 | /// </summary>
|
---|
| 69 | [OperationContract]
|
---|
| 70 | IEnumerable<HiveExperiment> GetHiveExperiments();
|
---|
[4598] | 71 |
|
---|
[4593] | 72 | [OperationContract]
|
---|
[4629] | 73 | Guid AddHiveExperiment(HiveExperiment hiveExperimentDto);
|
---|
| 74 |
|
---|
| 75 | [OperationContract]
|
---|
[4598] | 76 | void UpdateHiveExperiment(HiveExperiment hiveExperimentDto);
|
---|
| 77 |
|
---|
[4593] | 78 | [OperationContract]
|
---|
| 79 | void DeleteHiveExperiment(Guid hiveExperimentId);
|
---|
| 80 | #endregion
|
---|
| 81 |
|
---|
| 82 | #region Login Methods
|
---|
[5053] | 83 | [OperationContract]
|
---|
| 84 | void Hello(Guid slaveId, string name, int cores, int memory);
|
---|
| 85 |
|
---|
| 86 | [OperationContract]
|
---|
| 87 | void GoodBye();
|
---|
[4593] | 88 | #endregion
|
---|
| 89 |
|
---|
| 90 | #region Heartbeat Methods
|
---|
| 91 | [OperationContract]
|
---|
[5053] | 92 | List<MessageContainer> Heartbeat(Heartbeat heartbeat);
|
---|
[4593] | 93 | #endregion
|
---|
| 94 |
|
---|
| 95 | #region Plugin Methods
|
---|
| 96 | [OperationContract]
|
---|
[4905] | 97 | Guid AddPlugin(Plugin plugin, List<PluginData> pluginData);
|
---|
[4593] | 98 | [OperationContract]
|
---|
[5053] | 99 | IEnumerable<Plugin> GetPlugins();
|
---|
[4593] | 100 | [OperationContract]
|
---|
[5053] | 101 | IEnumerable<PluginData> GetPluginDatas(List<Guid> pluginIds);
|
---|
[4593] | 102 | #endregion
|
---|
[5062] | 103 |
|
---|
[4593] | 104 | #region Slave Methods
|
---|
| 105 | [OperationContract]
|
---|
[4649] | 106 | Guid AddSlave(Slave slave);
|
---|
| 107 |
|
---|
| 108 | [OperationContract]
|
---|
[4598] | 109 | Guid AddSlaveGroup(SlaveGroup slaveGroup);
|
---|
| 110 |
|
---|
[4593] | 111 | [OperationContract]
|
---|
[5106] | 112 | Slave GetSlave(Guid slaveId);
|
---|
| 113 |
|
---|
| 114 | [OperationContract]
|
---|
| 115 | SlaveGroup GetSlaveGroup(Guid slaveGroupId);
|
---|
| 116 |
|
---|
| 117 | [OperationContract]
|
---|
[4598] | 118 | IEnumerable<Slave> GetSlaves();
|
---|
[5106] | 119 |
|
---|
[4593] | 120 | [OperationContract]
|
---|
[4598] | 121 | IEnumerable<SlaveGroup> GetSlaveGroups();
|
---|
| 122 |
|
---|
[4593] | 123 | [OperationContract]
|
---|
[5106] | 124 | void UpdateSlave(Slave slave);
|
---|
[4598] | 125 |
|
---|
[4593] | 126 | [OperationContract]
|
---|
[5106] | 127 | void UpdateSlaveGroup(SlaveGroup slaveGroup);
|
---|
[4598] | 128 |
|
---|
[4593] | 129 | [OperationContract]
|
---|
[5106] | 130 | void DeleteSlave(Guid slaveId);
|
---|
| 131 |
|
---|
| 132 | [OperationContract]
|
---|
| 133 | void DeleteSlaveGroup(Guid slaveGroupId);
|
---|
| 134 |
|
---|
| 135 | [OperationContract]
|
---|
| 136 | void AddResourceToGroup(Guid slaveGroupId, Guid resourceId);
|
---|
| 137 |
|
---|
| 138 | [OperationContract]
|
---|
[4598] | 139 | void RemoveResourceFromGroup(Guid slaveGroupId, Guid resourceId);
|
---|
[4629] | 140 |
|
---|
[4593] | 141 | #endregion
|
---|
[5101] | 142 |
|
---|
[4593] | 143 | }
|
---|
| 144 | }
|
---|