PilotJob.h
1 
10 #ifndef WRENCH_PILOTJOB_H
11 #define WRENCH_PILOTJOB_H
12 
13 
14 #include "wrench/workflow/job/WorkflowJob.h"
15 #include "wrench/services/compute/ComputeService.h"
16 
17 namespace wrench {
18 
19  class ComputeService;
20 
21  /***********************/
23  /***********************/
24 
29  class PilotJob : public WorkflowJob {
30 
31  public:
32 
34  enum State {
47  };
48 
49  std::shared_ptr<ComputeService> getComputeService();
50 
52 
53  unsigned long getPriority();
54 
55  /***********************/
57  /***********************/
58 
59 
60  void setComputeService(std::shared_ptr<ComputeService> cs);
61 
62  /***********************/
64  /***********************/
65 
66  private:
67 
68  friend class JobManager;
69 
70  PilotJob(Workflow *workflow);
71 
72  State state;
73  std::shared_ptr<ComputeService> compute_service; // Associated compute service, i.e., the running pilot job
74  };
75 
76  /***********************/
78  /***********************/
79 
80 };
81 
82 
83 #endif //WRENCH_PILOTJOB_H
@ PENDING
Submitted but not running.
Definition: PilotJob.h:38
unsigned long getPriority()
Get the pilot job priority value.
Definition: PilotJob.cpp:38
@ NOT_SUBMITTED
Not submitted yet.
Definition: PilotJob.h:36
A helper daemon (co-located with and explicitly started by a WMS), which is used to handle all job ex...
Definition: JobManager.h:40
@ EXPIRED
Expired due to a time-to-live limit.
Definition: PilotJob.h:42
@ TERMINATED
Terminated by submitter.
Definition: PilotJob.h:46
Definition: Alarm.cpp:20
A workflow (to be executed by a WMS)
Definition: Workflow.h:34
@ RUNNING
Running.
Definition: PilotJob.h:40
Abstraction of a job used for executing tasks in a Workflow.
Definition: WorkflowJob.h:34
State
Pilot job states.
Definition: PilotJob.h:34
@ FAILED
Failed.
Definition: PilotJob.h:44
PilotJob::State getState()
Get the state of the pilot job.
Definition: PilotJob.cpp:30
A pilot (i.e., non-standard) workflow job that can be submitted to a ComputeService by a WMS (via a J...
Definition: PilotJob.h:29
std::shared_ptr< ComputeService > getComputeService()
Get the compute service provided by the (running) pilot job.
Definition: PilotJob.cpp:47