WRENCH  1.10
Cyberinfrastructure Simulation Workbench
Overview Installation Getting Started WRENCH 101 WRENCH 102
StorageServiceMessage.h
1 
11 #ifndef WRENCH_STORAGESERVICEMESSAGE_H
12 #define WRENCH_STORAGESERVICEMESSAGE_H
13 
14 
15 #include <memory>
16 
17 #include <wrench/services/ServiceMessage.h>
18 #include <wrench/workflow/failure_causes/FailureCause.h>
19 #include <wrench/services/file_registry/FileRegistryService.h>
20 #include <wrench/simulation/SimulationTimestampTypes.h>
21 #include <wrench/simulation/Simulation.h>
22 #include <wrench/simulation/SimulationOutput.h>
23 
24 namespace wrench {
25 
26  /***********************/
28  /***********************/
29 
34  protected:
35  StorageServiceMessage(std::string name, double payload);
36  };
37 
38 
43  public:
45 
47  std::string answer_mailbox;
48  };
49 
54  public:
55  StorageServiceFreeSpaceAnswerMessage(std::map<std::string, double> free_space, double payload);
56 
58  std::map<std::string, double> free_space;
59  };
60 
65  public:
67  std::shared_ptr<FileLocation> location, double payload);
68 
70  std::string answer_mailbox;
74  std::shared_ptr<FileLocation> location;
75  };
76 
81  public:
83 
88  };
89 
94  public:
97  std::shared_ptr<FileLocation> location,
98  double payload);
99 
101  std::string answer_mailbox;
105  std::shared_ptr<FileLocation> location;
106  };
107 
112  public:
114  std::shared_ptr<StorageService> storage_service,
115  bool success,
116  std::shared_ptr<FailureCause> failure_cause,
117  double payload);
118 
122  std::shared_ptr<StorageService> storage_service;
124  bool success;
126  std::shared_ptr<FailureCause> failure_cause;
127  };
128 
133  public:
135  std::shared_ptr<FileLocation> src,
136  std::shared_ptr<FileLocation> dst,
137  std::shared_ptr<FileRegistryService> file_registry_service,
138  double payload);
139 
141  std::string answer_mailbox;
145  std::shared_ptr<FileLocation> src;
147  std::shared_ptr<FileLocation> dst;
149  std::shared_ptr<FileRegistryService> file_registry_service;
150  };
151 
156  public:
158  std::shared_ptr<FileLocation> src,
159  std::shared_ptr<FileLocation> dst,
160  std::shared_ptr<FileRegistryService> file_registry_service,
162  bool success, std::shared_ptr<FailureCause> cause,
163  double payload);
164 
168  std::shared_ptr<FileLocation> src;
170  std::shared_ptr<FileLocation> dst;
172  std::shared_ptr<FileRegistryService> file_registry_service;
176  bool success;
178  std::shared_ptr<FailureCause> failure_cause;
179 
180  };
181 
182 
183 
188  public:
191  std::shared_ptr<FileLocation> location,
192  unsigned long buffer_size,
193  double payload);
194 
196  std::string answer_mailbox;
200  std::shared_ptr<FileLocation> location;
202  unsigned long buffer_size;
203  };
204 
209  public:
211  std::shared_ptr<FileLocation> location,
212  bool success,
213  std::shared_ptr<FailureCause> failure_cause,
214  std::string data_write_mailbox_name,
215  double payload);
216 
220  std::shared_ptr<FileLocation> location;
222  bool success;
226  std::shared_ptr<FailureCause> failure_cause;
227  };
228 
233  public:
237  std::shared_ptr<FileLocation> location,
238  unsigned long buffer_size,
239  double payload);
240 
242  std::string answer_mailbox;
248  std::shared_ptr<FileLocation> location;
250  unsigned long buffer_size;
251  };
252 
257  public:
259  std::shared_ptr<FileLocation> location,
260  bool success,
261  std::shared_ptr<FailureCause> failure_cause,
262  double payload);
263 
267  std::shared_ptr<FileLocation> location;
269  bool success;
271  std::shared_ptr<FailureCause> failure_cause;
272  };
273 
278  public:
280  unsigned long chunk_size, bool last_chunk);
281 
286  };
287 
288 
293  public:
295  };
296 
297 
298  /***********************/
300  /***********************/
301 
302 };
303 
304 
305 #endif //WRENCH_STORAGESERVICEMESSAGE_H
wrench::StorageServiceFileReadRequestMessage::location
std::shared_ptr< FileLocation > location
The location from which to read the file.
Definition: StorageServiceMessage.h:248
wrench::StorageServiceFileDeleteAnswerMessage::failure_cause
std::shared_ptr< FailureCause > failure_cause
The cause of the failure, or nullptr if success.
Definition: StorageServiceMessage.h:126
wrench::StorageServiceFileCopyAnswerMessage::src
std::shared_ptr< FileLocation > src
The source location.
Definition: StorageServiceMessage.h:168
wrench::StorageServiceFileCopyAnswerMessage::success
bool success
Whether the copy was successful.
Definition: StorageServiceMessage.h:176
wrench::StorageServiceFileCopyRequestMessage::src
std::shared_ptr< FileLocation > src
The source location.
Definition: StorageServiceMessage.h:145
wrench::StorageServiceFileReadAnswerMessage::file
WorkflowFile * file
The file that was read.
Definition: StorageServiceMessage.h:265
wrench::StorageServiceFileLookupRequestMessage::StorageServiceFileLookupRequestMessage
StorageServiceFileLookupRequestMessage(std::string answer_mailbox, WorkflowFile *file, std::shared_ptr< FileLocation > location, double payload)
Constructor.
Definition: StorageServiceMessage.cpp:78
wrench::StorageServiceFreeSpaceAnswerMessage
A message sent by a StorageService in answer to a free space enquiry.
Definition: StorageServiceMessage.h:53
wrench::SimulationMessage::name
std::string name
The message name.
Definition: SimulationMessage.h:37
wrench::StorageServiceFileLookupAnswerMessage
A message sent by a StorageService in answer to a file lookup request.
Definition: StorageServiceMessage.h:80
wrench::StorageServiceFileWriteRequestMessage
A message sent to a StorageService to write a file.
Definition: StorageServiceMessage.h:187
wrench::StorageServiceFileDeleteAnswerMessage::StorageServiceFileDeleteAnswerMessage
StorageServiceFileDeleteAnswerMessage(WorkflowFile *file, std::shared_ptr< StorageService > storage_service, bool success, std::shared_ptr< FailureCause > failure_cause, double payload)
Constructor.
Definition: StorageServiceMessage.cpp:150
wrench::StorageServiceFileWriteAnswerMessage::failure_cause
std::shared_ptr< FailureCause > failure_cause
The cause of the failure, if any, or nullptr.
Definition: StorageServiceMessage.h:226
wrench::StorageServiceMessage::StorageServiceMessage
StorageServiceMessage(std::string name, double payload)
Constructor.
Definition: StorageServiceMessage.cpp:27
wrench::StorageServiceFreeSpaceRequestMessage::StorageServiceFreeSpaceRequestMessage
StorageServiceFreeSpaceRequestMessage(std::string answer_mailbox, double payload)
Constructor.
Definition: StorageServiceMessage.cpp:39
wrench::StorageServiceFreeSpaceAnswerMessage::free_space
std::map< std::string, double > free_space
The amount of free space in bytes for each mount point, in a map.
Definition: StorageServiceMessage.h:58
wrench::StorageServiceFileDeleteRequestMessage::file
WorkflowFile * file
The file to delete.
Definition: StorageServiceMessage.h:103
wrench::StorageServiceFileLookupRequestMessage::answer_mailbox
std::string answer_mailbox
Mailbox to which the answer message should be sent.
Definition: StorageServiceMessage.h:70
wrench::StorageServiceMessage
Top-level class for messages received/sent by a StorageService.
Definition: StorageServiceMessage.h:33
wrench::StorageServiceFileCopyRequestMessage::file_registry_service
std::shared_ptr< FileRegistryService > file_registry_service
The file registry service to update, or none if nullptr.
Definition: StorageServiceMessage.h:149
wrench::StorageServiceFreeSpaceRequestMessage
A message sent to a StorageService to enquire about its free space.
Definition: StorageServiceMessage.h:42
wrench::StorageServiceFileLookupRequestMessage::file
WorkflowFile * file
The file to lookup.
Definition: StorageServiceMessage.h:72
wrench::StorageServiceFileWriteAnswerMessage::StorageServiceFileWriteAnswerMessage
StorageServiceFileWriteAnswerMessage(WorkflowFile *file, std::shared_ptr< FileLocation > location, bool success, std::shared_ptr< FailureCause > failure_cause, std::string data_write_mailbox_name, double payload)
Constructor.
Definition: StorageServiceMessage.cpp:283
wrench::ServiceMessage
Top-level class for messages received/sent by a Service.
Definition: ServiceMessage.h:27
wrench::StorageServiceFileReadAnswerMessage::failure_cause
std::shared_ptr< FailureCause > failure_cause
The cause of the failure, or nullptr on success.
Definition: StorageServiceMessage.h:271
wrench::StorageServiceFileContentChunkMessage::last_chunk
bool last_chunk
Whether this is the last file chunk.
Definition: StorageServiceMessage.h:285
wrench::StorageServiceFileDeleteAnswerMessage::storage_service
std::shared_ptr< StorageService > storage_service
The storage service on which the deletion happened (or not)
Definition: StorageServiceMessage.h:122
wrench::StorageServiceFileReadAnswerMessage
A message sent by a StorageService in answer to a file read request.
Definition: StorageServiceMessage.h:256
wrench::StorageServiceFileCopyRequestMessage
A message sent to a StorageService to copy a file from another StorageService.
Definition: StorageServiceMessage.h:132
wrench::StorageServiceFileReadRequestMessage::mailbox_to_receive_the_file_content
std::string mailbox_to_receive_the_file_content
The mailbox to which the file content should be sent.
Definition: StorageServiceMessage.h:244
wrench::StorageServiceFileCopyAnswerMessage::failure_cause
std::shared_ptr< FailureCause > failure_cause
The cause of the failure, or nullptr if success.
Definition: StorageServiceMessage.h:178
wrench
Definition: Alarm.cpp:20
wrench::StorageServiceFileCopyAnswerMessage
A message sent by a StorageService in answer to a file copy request.
Definition: StorageServiceMessage.h:155
wrench::StorageServiceFileReadRequestMessage::buffer_size
unsigned long buffer_size
The requested buffer size.
Definition: StorageServiceMessage.h:250
wrench::StorageServiceFileWriteRequestMessage::StorageServiceFileWriteRequestMessage
StorageServiceFileWriteRequestMessage(std::string answer_mailbox, WorkflowFile *file, std::shared_ptr< FileLocation > location, unsigned long buffer_size, double payload)
Constructor.
Definition: StorageServiceMessage.cpp:253
wrench::StorageServiceFileReadRequestMessage::answer_mailbox
std::string answer_mailbox
The mailbox to which the answer message should be sent.
Definition: StorageServiceMessage.h:242
wrench::StorageServiceFileContentChunkMessage
A message sent/received by a StorageService that has a file size as a payload.
Definition: StorageServiceMessage.h:277
wrench::StorageServiceFileWriteRequestMessage::buffer_size
unsigned long buffer_size
The buffer size to use.
Definition: StorageServiceMessage.h:202
wrench::StorageServiceFileCopyAnswerMessage::file
WorkflowFile * file
The file was was copied, or not.
Definition: StorageServiceMessage.h:166
wrench::StorageServiceFreeSpaceAnswerMessage::StorageServiceFreeSpaceAnswerMessage
StorageServiceFreeSpaceAnswerMessage(std::map< std::string, double > free_space, double payload)
Constructor.
Definition: StorageServiceMessage.cpp:56
wrench::StorageServiceFileCopyRequestMessage::answer_mailbox
std::string answer_mailbox
Mailbox to which the answer message should be sent.
Definition: StorageServiceMessage.h:141
wrench::StorageServiceAckMessage
A message sent by a StorageService as an ack.
Definition: StorageServiceMessage.h:292
wrench::StorageServiceFileCopyAnswerMessage::dst
std::shared_ptr< FileLocation > dst
The destination location.
Definition: StorageServiceMessage.h:170
wrench::StorageServiceFileWriteAnswerMessage::file
WorkflowFile * file
The workflow file that should be written.
Definition: StorageServiceMessage.h:218
wrench::StorageServiceFileDeleteAnswerMessage::file
WorkflowFile * file
The file that was deleted (or not)
Definition: StorageServiceMessage.h:120
wrench::SimulationMessage::payload
double payload
The message size in bytes.
Definition: SimulationMessage.h:39
wrench::StorageServiceFileWriteRequestMessage::answer_mailbox
std::string answer_mailbox
Mailbox to which the answer message should be sent.
Definition: StorageServiceMessage.h:196
wrench::StorageServiceFileLookupAnswerMessage::StorageServiceFileLookupAnswerMessage
StorageServiceFileLookupAnswerMessage(WorkflowFile *file, bool file_is_available, double payload)
Constructor.
Definition: StorageServiceMessage.cpp:101
wrench::StorageServiceFileWriteAnswerMessage::location
std::shared_ptr< FileLocation > location
The location at which the file should be written.
Definition: StorageServiceMessage.h:220
wrench::StorageServiceFileWriteAnswerMessage::success
bool success
Whether the write operation request was accepted or not.
Definition: StorageServiceMessage.h:222
wrench::StorageServiceFileDeleteAnswerMessage::success
bool success
Whether the deletion was successful.
Definition: StorageServiceMessage.h:124
wrench::StorageServiceFileLookupRequestMessage
A message sent to a StorageService to lookup a file.
Definition: StorageServiceMessage.h:64
wrench::StorageServiceFileDeleteAnswerMessage
A message sent by a StorageService in answer to a file deletion request.
Definition: StorageServiceMessage.h:111
wrench::StorageServiceFileWriteAnswerMessage
A message sent by a StorageService in answer to a file write request.
Definition: StorageServiceMessage.h:208
wrench::StorageServiceFileContentChunkMessage::StorageServiceFileContentChunkMessage
StorageServiceFileContentChunkMessage(WorkflowFile *file, unsigned long chunk_size, bool last_chunk)
Constructor.
Definition: StorageServiceMessage.cpp:370
wrench::StorageServiceFileDeleteRequestMessage::location
std::shared_ptr< FileLocation > location
The location where the file will be deleted.
Definition: StorageServiceMessage.h:105
wrench::StorageServiceFileDeleteRequestMessage::StorageServiceFileDeleteRequestMessage
StorageServiceFileDeleteRequestMessage(std::string answer_mailbox, WorkflowFile *file, std::shared_ptr< FileLocation > location, double payload)
Constructor.
Definition: StorageServiceMessage.cpp:124
wrench::StorageServiceFileCopyAnswerMessage::file_registry_service_updated
bool file_registry_service_updated
Whether a file registry service has been updated or not.
Definition: StorageServiceMessage.h:174
wrench::StorageServiceFileDeleteRequestMessage
A message sent to a StorageService to delete a file.
Definition: StorageServiceMessage.h:93
wrench::StorageServiceFileDeleteRequestMessage::answer_mailbox
std::string answer_mailbox
Mailbox to which the answer message should be sent.
Definition: StorageServiceMessage.h:101
wrench::StorageServiceFileContentChunkMessage::file
WorkflowFile * file
The file.
Definition: StorageServiceMessage.h:283
wrench::StorageServiceFileWriteRequestMessage::location
std::shared_ptr< FileLocation > location
The location to write the file to.
Definition: StorageServiceMessage.h:200
wrench::StorageServiceFileReadRequestMessage::file
WorkflowFile * file
The file to read.
Definition: StorageServiceMessage.h:246
wrench::StorageServiceFileLookupRequestMessage::location
std::shared_ptr< FileLocation > location
The file location (hopefully)
Definition: StorageServiceMessage.h:74
wrench::StorageServiceFileCopyRequestMessage::file
WorkflowFile * file
The file to copy.
Definition: StorageServiceMessage.h:143
wrench::StorageServiceFileReadAnswerMessage::location
std::shared_ptr< FileLocation > location
The location of the file.
Definition: StorageServiceMessage.h:267
wrench::StorageServiceFileReadRequestMessage
A message sent to a StorageService to read a file.
Definition: StorageServiceMessage.h:232
wrench::StorageServiceFileCopyAnswerMessage::StorageServiceFileCopyAnswerMessage
StorageServiceFileCopyAnswerMessage(WorkflowFile *file, std::shared_ptr< FileLocation > src, std::shared_ptr< FileLocation > dst, std::shared_ptr< FileRegistryService > file_registry_service, bool file_registry_service_updated, bool success, std::shared_ptr< FailureCause > cause, double payload)
Constructor.
Definition: StorageServiceMessage.cpp:217
wrench::StorageServiceFileCopyRequestMessage::StorageServiceFileCopyRequestMessage
StorageServiceFileCopyRequestMessage(std::string answer_mailbox, WorkflowFile *file, std::shared_ptr< FileLocation > src, std::shared_ptr< FileLocation > dst, std::shared_ptr< FileRegistryService > file_registry_service, double payload)
Constructor.
Definition: StorageServiceMessage.cpp:180
wrench::WorkflowFile
A data file used/produced by a WorkflowTask in a Workflow.
Definition: WorkflowFile.h:26
wrench::StorageServiceFileCopyAnswerMessage::file_registry_service
std::shared_ptr< FileRegistryService > file_registry_service
The file registry service that the user had requested be updated, or nullptr if none.
Definition: StorageServiceMessage.h:172
wrench::StorageServiceFileLookupAnswerMessage::file_is_available
bool file_is_available
Whether the file was found.
Definition: StorageServiceMessage.h:87
wrench::StorageServiceFileReadRequestMessage::StorageServiceFileReadRequestMessage
StorageServiceFileReadRequestMessage(std::string answer_mailbox, std::string mailbox_to_receive_the_file_content, WorkflowFile *file, std::shared_ptr< FileLocation > location, unsigned long buffer_size, double payload)
Constructor.
Definition: StorageServiceMessage.cpp:316
wrench::StorageServiceFileCopyRequestMessage::dst
std::shared_ptr< FileLocation > dst
The destination location.
Definition: StorageServiceMessage.h:147
wrench::StorageServiceFileReadAnswerMessage::StorageServiceFileReadAnswerMessage
StorageServiceFileReadAnswerMessage(WorkflowFile *file, std::shared_ptr< FileLocation > location, bool success, std::shared_ptr< FailureCause > failure_cause, double payload)
Constructor.
Definition: StorageServiceMessage.cpp:346
wrench::StorageServiceFileWriteAnswerMessage::data_write_mailbox_name
std::string data_write_mailbox_name
The mailbox on which to send the file.
Definition: StorageServiceMessage.h:224
wrench::StorageServiceFileReadAnswerMessage::success
bool success
Whether the read operation was successful or not.
Definition: StorageServiceMessage.h:269
wrench::StorageServiceFreeSpaceRequestMessage::answer_mailbox
std::string answer_mailbox
Mailbox to which the answer message should be sent.
Definition: StorageServiceMessage.h:47
wrench::StorageServiceFileWriteRequestMessage::file
WorkflowFile * file
The file to write.
Definition: StorageServiceMessage.h:198
wrench::StorageServiceFileLookupAnswerMessage::file
WorkflowFile * file
The file that was looked up.
Definition: StorageServiceMessage.h:85