WRENCH  1.10
Cyberinfrastructure Simulation Workbench
Overview Installation Getting Started WRENCH 101 WRENCH 102
ComputeServiceMessage.h
1 
11 #ifndef WRENCH_COMPUTESERVICEMESSAGE_H
12 #define WRENCH_COMPUTESERVICEMESSAGE_H
13 
14 #include <memory>
15 #include <vector>
16 #include "wrench/workflow/failure_causes/FailureCause.h"
17 #include "wrench/services/ServiceMessage.h"
18 
19 namespace wrench {
20 
21  class StandardJob;
22 
23  class PilotJob;
24 
25  /***********************/
27  /***********************/
28 
32  class ComputeServiceMessage : public ServiceMessage {
33  protected:
34  ComputeServiceMessage(std::string name, double payload);
35  };
36 
40  class ComputeServiceSubmitStandardJobRequestMessage : public ComputeServiceMessage {
41  public:
42  ComputeServiceSubmitStandardJobRequestMessage(const std::string answer_mailbox, std::shared_ptr<StandardJob> ,
43  const std::map<std::string, std::string> service_specific_args,
44  double payload);
45 
47  std::string answer_mailbox;
49  std::shared_ptr<StandardJob> job;
51  std::map<std::string, std::string> service_specific_args;
52  };
53 
57  class ComputeServiceSubmitStandardJobAnswerMessage : public ComputeServiceMessage {
58  public:
59  ComputeServiceSubmitStandardJobAnswerMessage(std::shared_ptr<StandardJob> , std::shared_ptr<ComputeService>, bool success,
60  std::shared_ptr<FailureCause> failure_cause, double payload);
61 
63  std::shared_ptr<StandardJob> job;
65  std::shared_ptr<ComputeService> compute_service;
67  bool success;
69  std::shared_ptr<FailureCause> failure_cause;
70  };
71 
75  class ComputeServiceStandardJobDoneMessage : public ComputeServiceMessage {
76  public:
77  ComputeServiceStandardJobDoneMessage(std::shared_ptr<StandardJob> , std::shared_ptr<ComputeService>, double payload);
78 
80  std::shared_ptr<StandardJob> job;
82  std::shared_ptr<ComputeService> compute_service;
83  };
84 
88  class ComputeServiceStandardJobFailedMessage : public ComputeServiceMessage {
89  public:
90  ComputeServiceStandardJobFailedMessage(std::shared_ptr<StandardJob> , std::shared_ptr<ComputeService>,
91  std::shared_ptr<FailureCause> cause,
92  double payload);
93 
95  std::shared_ptr<StandardJob> job;
97  std::shared_ptr<ComputeService> compute_service;
99  std::shared_ptr<FailureCause> cause;
100  };
101 
105  class ComputeServiceTerminateStandardJobRequestMessage : public ComputeServiceMessage {
106  public:
107  ComputeServiceTerminateStandardJobRequestMessage(std::string answer_mailbox, std::shared_ptr<StandardJob> , double payload);
108 
110  std::string answer_mailbox;
112  std::shared_ptr<StandardJob> job;
113  };
114 
118  class ComputeServiceTerminateStandardJobAnswerMessage : public ComputeServiceMessage {
119  public:
120  ComputeServiceTerminateStandardJobAnswerMessage(std::shared_ptr<StandardJob> , std::shared_ptr<ComputeService>, bool success,
121  std::shared_ptr<FailureCause> failure_cause, double payload);
122 
124  std::shared_ptr<StandardJob> job;
126  std::shared_ptr<ComputeService> compute_service;
128  bool success;
130  std::shared_ptr<FailureCause> failure_cause;
131  };
132 
136  class ComputeServiceSubmitPilotJobRequestMessage : public ComputeServiceMessage {
137  public:
138  ComputeServiceSubmitPilotJobRequestMessage(std::string answer_mailbox, std::shared_ptr<PilotJob> ,
139  const std::map<std::string, std::string> service_specific_args,
140  double payload);
141 
143  std::string answer_mailbox;
145  std::shared_ptr<PilotJob> job;
147  std::map<std::string, std::string> service_specific_args;
148  };
149 
153  class ComputeServiceSubmitPilotJobAnswerMessage : public ComputeServiceMessage {
154  public:
155  ComputeServiceSubmitPilotJobAnswerMessage(std::shared_ptr<PilotJob> , std::shared_ptr<ComputeService>, bool success,
156  std::shared_ptr<FailureCause> cause,
157  double payload);
158 
160  std::shared_ptr<PilotJob> job;
162  std::shared_ptr<ComputeService> compute_service;
164  bool success;
166  std::shared_ptr<FailureCause> failure_cause;
167  };
168 
169 
173  class ComputeServicePilotJobStartedMessage : public ComputeServiceMessage {
174  public:
175  ComputeServicePilotJobStartedMessage(std::shared_ptr<PilotJob> , std::shared_ptr<ComputeService>, double payload);
176 
178  std::shared_ptr<PilotJob> job;
180  std::shared_ptr<ComputeService> compute_service;
181  };
182 
186  class ComputeServicePilotJobExpiredMessage : public ComputeServiceMessage {
187  public:
188  ComputeServicePilotJobExpiredMessage(std::shared_ptr<PilotJob> , std::shared_ptr<ComputeService>, double payload);
189 
191  std::shared_ptr<PilotJob> job;
193  std::shared_ptr<ComputeService> compute_service;
194  };
195 
199  class ComputeServicePilotJobFailedMessage : public ComputeServiceMessage {
200  public:
201  ComputeServicePilotJobFailedMessage(std::shared_ptr<PilotJob> , std::shared_ptr<ComputeService>, double payload);
202 
204  std::shared_ptr<PilotJob> job;
206  std::shared_ptr<ComputeService> compute_service;
207  };
208 
212  class ComputeServiceTerminatePilotJobRequestMessage : public ComputeServiceMessage {
213  public:
214  ComputeServiceTerminatePilotJobRequestMessage(std::string answer_mailbox, std::shared_ptr<PilotJob> , double payload);
215 
217  std::string answer_mailbox;
219  std::shared_ptr<PilotJob> job;
220  };
221 
225  class ComputeServiceTerminatePilotJobAnswerMessage : public ComputeServiceMessage {
226  public:
227  ComputeServiceTerminatePilotJobAnswerMessage(std::shared_ptr<PilotJob> , std::shared_ptr<ComputeService> compute_service,
228  bool success,
229  std::shared_ptr<FailureCause> failure_cause, double payload);
230 
232  std::shared_ptr<PilotJob> job;
234  std::shared_ptr<ComputeService> compute_service;
236  bool success;
238  std::shared_ptr<FailureCause> failure_cause;
239  };
240 
241 
245  class ComputeServiceResourceInformationRequestMessage : public ComputeServiceMessage {
246  public:
247  ComputeServiceResourceInformationRequestMessage(std::string answer_mailbox, double payload);
248 
250  std::string answer_mailbox;
251  };
252 
256  class ComputeServiceResourceInformationAnswerMessage : public ComputeServiceMessage {
257  public:
258  ComputeServiceResourceInformationAnswerMessage(std::map<std::string, std::map<std::string, double>> info,
259  double payload);
260 
262  std::map<std::string, std::map<std::string, double>> info;
263  };
264 
268  class ComputeServiceIsThereAtLeastOneHostWithAvailableResourcesRequestMessage : public ComputeServiceMessage {
269  public:
270  ComputeServiceIsThereAtLeastOneHostWithAvailableResourcesRequestMessage(const std::string &answer_mailbox,
271  unsigned long num_cores,
272  double ram, double payload);
273 
275  std::string answer_mailbox;
277  unsigned long num_cores;
279  double ram;
280  };
281 
285  class ComputeServiceIsThereAtLeastOneHostWithAvailableResourcesAnswerMessage : public ComputeServiceMessage {
286  public:
287  ComputeServiceIsThereAtLeastOneHostWithAvailableResourcesAnswerMessage(bool answer, double payload);
288 
290  bool answer;
291  };
292 
293  /***********************/
295  /***********************/
296 
297 };
298 
299 #endif //WRENCH_COMPUTESERVICEMESSAGE_H
wrench
Definition: Alarm.cpp:20