10 #ifndef WRENCH_EXECUTIONCONTROLLER_H
11 #define WRENCH_EXECUTIONCONTROLLER_H
13 #include "wrench/services/metering/EnergyMeterService.h"
14 #include "wrench/services/metering/BandwidthMeterService.h"
15 #include "wrench/services/Service.h"
16 #include "wrench/managers/DataMovementManager.h"
17 #include "wrench/services/compute/cloud/CloudComputeService.h"
18 #include "wrench/execution_events/CompoundJobFailedEvent.h"
19 #include "wrench/execution_events/CompoundJobCompletedEvent.h"
20 #include "wrench/execution_events/StandardJobCompletedEvent.h"
21 #include "wrench/execution_events/StandardJobFailedEvent.h"
22 #include "wrench/execution_events/PilotJobStartedEvent.h"
23 #include "wrench/execution_events/PilotJobExpiredEvent.h"
24 #include "wrench/execution_events/FileCopyCompletedEvent.h"
25 #include "wrench/execution_events/FileCopyFailedEvent.h"
26 #include "wrench/execution_events/TimerEvent.h"
27 #include "wrench/workflow/Workflow.h"
44 virtual std::shared_ptr<JobManager> createJobManager();
45 virtual std::shared_ptr<DataMovementManager> createDataMovementManager();
46 std::shared_ptr<EnergyMeterService> createEnergyMeter(
const std::map<std::string, double> &measurement_periods);
47 std::shared_ptr<EnergyMeterService> createEnergyMeter(
const std::vector<std::string> &hostnames,
double measurement_period);
48 std::shared_ptr<BandwidthMeterService> createBandwidthMeter(
const std::map<std::string, double> &measurement_periods);
49 std::shared_ptr<BandwidthMeterService> createBandwidthMeter(
const std::vector<std::string> &linknames,
double measurement_period);
52 std::shared_ptr<ExecutionEvent> waitForNextEvent();
53 std::shared_ptr<ExecutionEvent> waitForNextEvent(
double timeout);
55 void waitForAndProcessNextEvent();
56 bool waitForAndProcessNextEvent(
double timeout);
58 virtual void processEventCompoundJobFailure(std::shared_ptr<CompoundJobFailedEvent>);
59 virtual void processEventCompoundJobCompletion(std::shared_ptr<CompoundJobCompletedEvent>);
61 virtual void processEventStandardJobCompletion(std::shared_ptr<StandardJobCompletedEvent>);
62 virtual void processEventStandardJobFailure(std::shared_ptr<StandardJobFailedEvent>);
65 virtual void processEventPilotJobStart(std::shared_ptr<PilotJobStartedEvent>);
66 virtual void processEventPilotJobExpiration(std::shared_ptr<PilotJobExpiredEvent>);
68 virtual void processEventFileCopyCompletion(std::shared_ptr<FileCopyCompletedEvent>);
69 virtual void processEventFileCopyFailure(std::shared_ptr<FileCopyFailedEvent>);
71 virtual void processEventTimer(std::shared_ptr<TimerEvent>);
76 const std::string &hostname,
77 const std::string suffix);
80 void setTimer(
double date, std::string message);
92 friend class DataMovementManager;
93 friend class JobManager;
100 virtual int main() = 0;
107 #endif //WRENCH_EXECUTIONCONTROLLER_H