11 #ifndef WRENCH_COMPUTESERVICEMESSAGE_H
12 #define WRENCH_COMPUTESERVICEMESSAGE_H
16 #include "wrench/workflow/failure_causes/FailureCause.h"
17 #include "wrench/services/ServiceMessage.h"
32 class ComputeServiceMessage :
public ServiceMessage {
34 ComputeServiceMessage(std::string name,
double payload);
40 class ComputeServiceSubmitStandardJobRequestMessage :
public ComputeServiceMessage {
42 ComputeServiceSubmitStandardJobRequestMessage(
const std::string answer_mailbox, std::shared_ptr<StandardJob> ,
43 const std::map<std::string, std::string> service_specific_args,
47 std::string answer_mailbox;
49 std::shared_ptr<StandardJob> job;
51 std::map<std::string, std::string> service_specific_args;
57 class ComputeServiceSubmitStandardJobAnswerMessage :
public ComputeServiceMessage {
59 ComputeServiceSubmitStandardJobAnswerMessage(std::shared_ptr<StandardJob> , std::shared_ptr<ComputeService>,
bool success,
60 std::shared_ptr<FailureCause> failure_cause,
double payload);
63 std::shared_ptr<StandardJob> job;
65 std::shared_ptr<ComputeService> compute_service;
69 std::shared_ptr<FailureCause> failure_cause;
75 class ComputeServiceStandardJobDoneMessage :
public ComputeServiceMessage {
77 ComputeServiceStandardJobDoneMessage(std::shared_ptr<StandardJob> , std::shared_ptr<ComputeService>,
double payload);
80 std::shared_ptr<StandardJob> job;
82 std::shared_ptr<ComputeService> compute_service;
88 class ComputeServiceStandardJobFailedMessage :
public ComputeServiceMessage {
90 ComputeServiceStandardJobFailedMessage(std::shared_ptr<StandardJob> , std::shared_ptr<ComputeService>,
91 std::shared_ptr<FailureCause> cause,
95 std::shared_ptr<StandardJob> job;
97 std::shared_ptr<ComputeService> compute_service;
99 std::shared_ptr<FailureCause> cause;
105 class ComputeServiceTerminateStandardJobRequestMessage :
public ComputeServiceMessage {
107 ComputeServiceTerminateStandardJobRequestMessage(std::string answer_mailbox, std::shared_ptr<StandardJob> ,
double payload);
110 std::string answer_mailbox;
112 std::shared_ptr<StandardJob> job;
118 class ComputeServiceTerminateStandardJobAnswerMessage :
public ComputeServiceMessage {
120 ComputeServiceTerminateStandardJobAnswerMessage(std::shared_ptr<StandardJob> , std::shared_ptr<ComputeService>,
bool success,
121 std::shared_ptr<FailureCause> failure_cause,
double payload);
124 std::shared_ptr<StandardJob> job;
126 std::shared_ptr<ComputeService> compute_service;
130 std::shared_ptr<FailureCause> failure_cause;
136 class ComputeServiceSubmitPilotJobRequestMessage :
public ComputeServiceMessage {
138 ComputeServiceSubmitPilotJobRequestMessage(std::string answer_mailbox, std::shared_ptr<PilotJob> ,
139 const std::map<std::string, std::string> service_specific_args,
143 std::string answer_mailbox;
145 std::shared_ptr<PilotJob> job;
147 std::map<std::string, std::string> service_specific_args;
153 class ComputeServiceSubmitPilotJobAnswerMessage :
public ComputeServiceMessage {
155 ComputeServiceSubmitPilotJobAnswerMessage(std::shared_ptr<PilotJob> , std::shared_ptr<ComputeService>,
bool success,
156 std::shared_ptr<FailureCause> cause,
160 std::shared_ptr<PilotJob> job;
162 std::shared_ptr<ComputeService> compute_service;
166 std::shared_ptr<FailureCause> failure_cause;
173 class ComputeServicePilotJobStartedMessage :
public ComputeServiceMessage {
175 ComputeServicePilotJobStartedMessage(std::shared_ptr<PilotJob> , std::shared_ptr<ComputeService>,
double payload);
178 std::shared_ptr<PilotJob> job;
180 std::shared_ptr<ComputeService> compute_service;
186 class ComputeServicePilotJobExpiredMessage :
public ComputeServiceMessage {
188 ComputeServicePilotJobExpiredMessage(std::shared_ptr<PilotJob> , std::shared_ptr<ComputeService>,
double payload);
191 std::shared_ptr<PilotJob> job;
193 std::shared_ptr<ComputeService> compute_service;
199 class ComputeServicePilotJobFailedMessage :
public ComputeServiceMessage {
201 ComputeServicePilotJobFailedMessage(std::shared_ptr<PilotJob> , std::shared_ptr<ComputeService>,
double payload);
204 std::shared_ptr<PilotJob> job;
206 std::shared_ptr<ComputeService> compute_service;
212 class ComputeServiceTerminatePilotJobRequestMessage :
public ComputeServiceMessage {
214 ComputeServiceTerminatePilotJobRequestMessage(std::string answer_mailbox, std::shared_ptr<PilotJob> ,
double payload);
217 std::string answer_mailbox;
219 std::shared_ptr<PilotJob> job;
225 class ComputeServiceTerminatePilotJobAnswerMessage :
public ComputeServiceMessage {
227 ComputeServiceTerminatePilotJobAnswerMessage(std::shared_ptr<PilotJob> , std::shared_ptr<ComputeService> compute_service,
229 std::shared_ptr<FailureCause> failure_cause,
double payload);
232 std::shared_ptr<PilotJob> job;
234 std::shared_ptr<ComputeService> compute_service;
238 std::shared_ptr<FailureCause> failure_cause;
245 class ComputeServiceResourceInformationRequestMessage :
public ComputeServiceMessage {
247 ComputeServiceResourceInformationRequestMessage(std::string answer_mailbox,
double payload);
250 std::string answer_mailbox;
256 class ComputeServiceResourceInformationAnswerMessage :
public ComputeServiceMessage {
258 ComputeServiceResourceInformationAnswerMessage(std::map<std::string, std::map<std::string, double>> info,
262 std::map<std::string, std::map<std::string, double>> info;
268 class ComputeServiceIsThereAtLeastOneHostWithAvailableResourcesRequestMessage :
public ComputeServiceMessage {
270 ComputeServiceIsThereAtLeastOneHostWithAvailableResourcesRequestMessage(
const std::string &answer_mailbox,
271 unsigned long num_cores,
272 double ram,
double payload);
275 std::string answer_mailbox;
277 unsigned long num_cores;
285 class ComputeServiceIsThereAtLeastOneHostWithAvailableResourcesAnswerMessage :
public ComputeServiceMessage {
287 ComputeServiceIsThereAtLeastOneHostWithAvailableResourcesAnswerMessage(
bool answer,
double payload);
299 #endif //WRENCH_COMPUTESERVICEMESSAGE_H