WRENCH  1.11
Cyberinfrastructure Simulation Workbench
Overview Installation Getting Started WRENCH 101 WRENCH 102
FileTransferThreadMessage.h
1 
10 #ifndef WRENCH_FILETRANSFERTHREADMESSAGE_H
11 #define WRENCH_FILETRANSFERTHREADMESSAGE_H
12 
13 #include <memory>
14 
15 #include "wrench/services/ServiceMessage.h"
16 #include "wrench/failure_causes/FailureCause.h"
17 #include "wrench/services/file_registry/FileRegistryService.h"
18 #include "wrench/simulation/SimulationTimestampTypes.h"
19 #include "wrench/simulation/Simulation.h"
20 #include "wrench/simulation/SimulationOutput.h"
21 #include "wrench/services/storage/storage_helpers/FileTransferThread.h"
22 
23 namespace wrench {
24 
25  /***********************/
27  /***********************/
28 
32  class FileTransferThreadMessage : public ServiceMessage {
33  protected:
39  FileTransferThreadMessage(double payload) :
40  ServiceMessage(payload) {}
41  };
42 
43 
47  class FileTransferThreadNotificationMessage : public FileTransferThreadMessage {
48  public:
64  FileTransferThreadNotificationMessage(std::shared_ptr<FileTransferThread> file_transfer_thread,
65  std::shared_ptr<DataFile>file,
66  simgrid::s4u::Mailbox *src_mailbox,
67  std::shared_ptr<FileLocation> src_location,
68  simgrid::s4u::Mailbox *dst_mailbox,
69  std::shared_ptr<FileLocation> dst_location,
70  simgrid::s4u::Mailbox *answer_mailbox_if_read,
71  simgrid::s4u::Mailbox *answer_mailbox_if_write,
72  simgrid::s4u::Mailbox *answer_mailbox_if_copy,
73  bool success, std::shared_ptr<FailureCause> failure_cause) :
74  FileTransferThreadMessage(0),
75  file_transfer_thread(file_transfer_thread),
76  file(file),
77  src_mailbox(src_mailbox), src_location(src_location),
78  dst_mailbox(dst_mailbox), dst_location(dst_location),
79  answer_mailbox_if_read(answer_mailbox_if_read),
80  answer_mailbox_if_write(answer_mailbox_if_write),
81  answer_mailbox_if_copy(answer_mailbox_if_copy),
82  success(success),
83  failure_cause(failure_cause) {}
84 
86  std::shared_ptr<FileTransferThread> file_transfer_thread;
88  std::shared_ptr<DataFile>file;
89 
91  simgrid::s4u::Mailbox *src_mailbox;
93  std::shared_ptr<FileLocation> src_location;
94 
96  simgrid::s4u::Mailbox *dst_mailbox;
98  std::shared_ptr<FileLocation> dst_location;
99 
101  simgrid::s4u::Mailbox *answer_mailbox_if_read;
103  simgrid::s4u::Mailbox *answer_mailbox_if_write;
105  simgrid::s4u::Mailbox *answer_mailbox_if_copy;
107  bool success;
109  std::shared_ptr<FailureCause> failure_cause;
110  };
111 
112 
113  /***********************/
115  /***********************/
116 
117 };
118 
119 
120 #endif //WRENCH_FILETRANSFERTHREADMESSAGE_H
wrench
Definition: Action.cpp:28