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 
33  protected:
41  };
42 
43 
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) :
76  file(file),
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::FileTransferThreadNotificationMessage::dst_mailbox
simgrid::s4u::Mailbox * dst_mailbox
Destination mailbox (or "" if destination wasn't a mailbox)
Definition: FileTransferThreadMessage.h:96
wrench::FileTransferThreadMessage
Top-level class for messages received/sent by a DataCommunicationThread.
Definition: FileTransferThreadMessage.h:32
wrench::FileTransferThreadNotificationMessage::failure_cause
std::shared_ptr< FailureCause > failure_cause
The failure cause is case of a failure.
Definition: FileTransferThreadMessage.h:109
wrench::ServiceMessage
Top-level class for messages received/sent by a Service.
Definition: ServiceMessage.h:27
wrench::FileTransferThreadNotificationMessage::answer_mailbox_if_read
simgrid::s4u::Mailbox * answer_mailbox_if_read
If this was a file read, the mailbox to which an answer should be send.
Definition: FileTransferThreadMessage.h:101
wrench
Definition: Action.cpp:28
wrench::FileTransferThreadNotificationMessage::FileTransferThreadNotificationMessage
FileTransferThreadNotificationMessage(std::shared_ptr< FileTransferThread > file_transfer_thread, std::shared_ptr< DataFile >file, simgrid::s4u::Mailbox *src_mailbox, std::shared_ptr< FileLocation > src_location, simgrid::s4u::Mailbox *dst_mailbox, std::shared_ptr< FileLocation > dst_location, simgrid::s4u::Mailbox *answer_mailbox_if_read, simgrid::s4u::Mailbox *answer_mailbox_if_write, simgrid::s4u::Mailbox *answer_mailbox_if_copy, bool success, std::shared_ptr< FailureCause > failure_cause)
Constructor.
Definition: FileTransferThreadMessage.h:64
wrench::FileTransferThreadNotificationMessage::dst_location
std::shared_ptr< FileLocation > dst_location
Destination location (or nullptr if source wasn't a location)
Definition: FileTransferThreadMessage.h:98
wrench::FileTransferThreadNotificationMessage::answer_mailbox_if_copy
simgrid::s4u::Mailbox * answer_mailbox_if_copy
If this was a file copy, the mailbox to which an answer should be send.
Definition: FileTransferThreadMessage.h:105
wrench::SimulationMessage::payload
double payload
The message name.
Definition: SimulationMessage.h:40
wrench::FileTransferThreadNotificationMessage::answer_mailbox_if_write
simgrid::s4u::Mailbox * answer_mailbox_if_write
If this was a file write, the mailbox to which an answer should be send.
Definition: FileTransferThreadMessage.h:103
wrench::FileTransferThreadMessage::FileTransferThreadMessage
FileTransferThreadMessage(double payload)
Constructor.
Definition: FileTransferThreadMessage.h:39
wrench::FileTransferThreadNotificationMessage::file_transfer_thread
std::shared_ptr< FileTransferThread > file_transfer_thread
File transfer thread that sent this message.
Definition: FileTransferThreadMessage.h:86
wrench::FileTransferThreadNotificationMessage::success
bool success
Whether the transfer succeeded or not.
Definition: FileTransferThreadMessage.h:107
wrench::FileTransferThreadNotificationMessage::src_location
std::shared_ptr< FileLocation > src_location
Source location (or nullptr if source wasn't a location)
Definition: FileTransferThreadMessage.h:93
wrench::FileTransferThreadNotificationMessage
A message sent to by a FileTransferThread to report on success/failure of the transfer.
Definition: FileTransferThreadMessage.h:47
wrench::FileTransferThreadNotificationMessage::src_mailbox
simgrid::s4u::Mailbox * src_mailbox
Source mailbox (or "" if source wasn't a mailbox)
Definition: FileTransferThreadMessage.h:91
wrench::FileTransferThreadNotificationMessage::file
std::shared_ptr< DataFile > file
File that was being communicated.
Definition: FileTransferThreadMessage.h:88