11 #ifndef WRENCH_STORAGESERVICEMESSAGE_H
12 #define WRENCH_STORAGESERVICEMESSAGE_H
17 #include "wrench/services/ServiceMessage.h"
18 #include "wrench/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"
72 std::shared_ptr<DataFile>
file;
85 std::shared_ptr<DataFile>
file;
96 std::shared_ptr<DataFile>
file,
97 std::shared_ptr<FileLocation>
location,
135 std::shared_ptr<DataFile>
file,
136 std::shared_ptr<FileLocation>
src,
137 std::shared_ptr<FileLocation>
dst,
146 std::shared_ptr<FileLocation>
src;
148 std::shared_ptr<FileLocation>
dst;
159 std::shared_ptr<FileLocation>
src,
160 std::shared_ptr<FileLocation>
dst,
163 bool success, std::shared_ptr<FailureCause> cause,
169 std::shared_ptr<FileLocation>
src;
171 std::shared_ptr<FileLocation>
dst;
191 std::shared_ptr<DataFile>
file,
192 std::shared_ptr<FileLocation>
location,
212 std::shared_ptr<FileLocation>
location,
215 simgrid::s4u::Mailbox *data_write_mailbox_name,
237 std::shared_ptr<DataFile>
file,
238 std::shared_ptr<FileLocation>
location,
263 std::shared_ptr<FileLocation>
location,
309 #endif //WRENCH_STORAGESERVICEMESSAGE_H
std::shared_ptr< FileLocation > location
The location from which to read the file.
Definition: StorageServiceMessage.h:250
std::shared_ptr< FailureCause > failure_cause
The cause of the failure, or nullptr if success.
Definition: StorageServiceMessage.h:126
std::shared_ptr< FileLocation > src
The source location.
Definition: StorageServiceMessage.h:169
bool success
Whether the copy was successful.
Definition: StorageServiceMessage.h:177
simgrid::s4u::Mailbox * answer_mailbox
Mailbox to which the answer message should be sent.
Definition: StorageServiceMessage.h:47
std::shared_ptr< FileLocation > src
The source location.
Definition: StorageServiceMessage.h:146
A message sent by a StorageService in answer to a free space enquiry.
Definition: StorageServiceMessage.h:53
simgrid::s4u::Mailbox * answer_mailbox
The mailbox to which the answer message should be sent.
Definition: StorageServiceMessage.h:244
StorageServiceMessage(double payload)
Constructor.
Definition: StorageServiceMessage.cpp:27
A message sent by a StorageService in answer to a file lookup request.
Definition: StorageServiceMessage.h:80
A message sent to a StorageService to write a file.
Definition: StorageServiceMessage.h:188
simgrid::s4u::Mailbox * answer_mailbox
Mailbox to which the answer message should be sent.
Definition: StorageServiceMessage.h:197
std::shared_ptr< FailureCause > failure_cause
The cause of the failure, if any, or nullptr.
Definition: StorageServiceMessage.h:227
StorageServiceFileCopyRequestMessage(simgrid::s4u::Mailbox *answer_mailbox, std::shared_ptr< DataFile > file, std::shared_ptr< FileLocation > src, std::shared_ptr< FileLocation > dst, std::shared_ptr< FileRegistryService > file_registry_service, double payload)
Constructor.
Definition: StorageServiceMessage.cpp:169
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
StorageServiceFileContentChunkMessage(std::shared_ptr< DataFile >file, unsigned long chunk_size, bool last_chunk)
Constructor.
Definition: StorageServiceMessage.cpp:334
Top-level class for messages received/sent by a StorageService.
Definition: StorageServiceMessage.h:33
simgrid::s4u::Mailbox * answer_mailbox
Mailbox to which the answer message should be sent.
Definition: StorageServiceMessage.h:142
StorageServiceFreeSpaceRequestMessage(simgrid::s4u::Mailbox *answer_mailbox, double payload)
Constructor.
Definition: StorageServiceMessage.cpp:39
std::shared_ptr< DataFile > file
The file to delete.
Definition: StorageServiceMessage.h:103
std::shared_ptr< DataFile > file
The file to write.
Definition: StorageServiceMessage.h:199
std::shared_ptr< FileRegistryService > file_registry_service
The file registry service to update, or none if nullptr.
Definition: StorageServiceMessage.h:150
A message sent to a StorageService to enquire about its free space.
Definition: StorageServiceMessage.h:42
StorageServiceFileLookupRequestMessage(simgrid::s4u::Mailbox *answer_mailbox, std::shared_ptr< DataFile >file, std::shared_ptr< FileLocation > location, double payload)
Constructor.
Definition: StorageServiceMessage.cpp:76
std::shared_ptr< DataFile > file
The file to lookup.
Definition: StorageServiceMessage.h:72
std::shared_ptr< DataFile > file
The file to copy.
Definition: StorageServiceMessage.h:144
Top-level class for messages received/sent by a Service.
Definition: ServiceMessage.h:27
simgrid::s4u::Mailbox * answer_mailbox
Mailbox to which the answer message should be sent.
Definition: StorageServiceMessage.h:70
std::shared_ptr< FailureCause > failure_cause
The cause of the failure, or nullptr on success.
Definition: StorageServiceMessage.h:275
std::shared_ptr< DataFile > file
The file that was deleted (or not)
Definition: StorageServiceMessage.h:120
bool last_chunk
Whether this is the last file chunk.
Definition: StorageServiceMessage.h:289
std::shared_ptr< StorageService > storage_service
The storage service on which the deletion happened (or not)
Definition: StorageServiceMessage.h:122
StorageServiceFileLookupAnswerMessage(std::shared_ptr< DataFile >file, bool file_is_available, double payload)
Constructor.
Definition: StorageServiceMessage.cpp:95
std::shared_ptr< DataFile > file
The file that was looked up.
Definition: StorageServiceMessage.h:85
simgrid::s4u::Mailbox * data_write_mailbox
The mailbox on which to send the file.
Definition: StorageServiceMessage.h:225
A message sent by a StorageService in answer to a file read request.
Definition: StorageServiceMessage.h:260
A message sent to a StorageService to copy a file from another StorageService.
Definition: StorageServiceMessage.h:132
std::shared_ptr< FailureCause > failure_cause
The cause of the failure, or nullptr if success.
Definition: StorageServiceMessage.h:179
simgrid::s4u::Mailbox * answer_mailbox
Mailbox to which the answer message should be sent.
Definition: StorageServiceMessage.h:101
Definition: Action.cpp:28
A message sent by a StorageService in answer to a file copy request.
Definition: StorageServiceMessage.h:156
unsigned long buffer_size
The requested buffer size.
Definition: StorageServiceMessage.h:254
StorageServiceFileDeleteRequestMessage(simgrid::s4u::Mailbox *answer_mailbox, std::shared_ptr< DataFile >file, std::shared_ptr< FileLocation > location, double payload)
Constructor.
Definition: StorageServiceMessage.cpp:117
A message sent/received by a StorageService that has a file size as a payload.
Definition: StorageServiceMessage.h:281
unsigned long buffer_size
The buffer size to use.
Definition: StorageServiceMessage.h:203
StorageServiceFreeSpaceAnswerMessage(std::map< std::string, double > free_space, double payload)
Constructor.
Definition: StorageServiceMessage.cpp:55
A message sent by a StorageService as an ack.
Definition: StorageServiceMessage.h:296
std::shared_ptr< FileLocation > dst
The destination location.
Definition: StorageServiceMessage.h:171
double payload
The message name.
Definition: SimulationMessage.h:40
simgrid::s4u::Mailbox * mailbox_to_receive_the_file_content
The mailbox to which the file content should be sent.
Definition: StorageServiceMessage.h:246
std::shared_ptr< FileLocation > location
The location at which the file should be written.
Definition: StorageServiceMessage.h:221
bool success
Whether the write operation request was accepted or not.
Definition: StorageServiceMessage.h:223
bool success
Whether the deletion was successful.
Definition: StorageServiceMessage.h:124
A message sent to a StorageService to lookup a file.
Definition: StorageServiceMessage.h:64
A message sent by a StorageService in answer to a file deletion request.
Definition: StorageServiceMessage.h:111
A message sent by a StorageService in answer to a file write request.
Definition: StorageServiceMessage.h:209
std::shared_ptr< FileLocation > location
The location where the file will be deleted.
Definition: StorageServiceMessage.h:105
StorageServiceFileDeleteAnswerMessage(std::shared_ptr< DataFile >file, std::shared_ptr< StorageService > storage_service, bool success, std::shared_ptr< FailureCause > failure_cause, double payload)
Constructor.
Definition: StorageServiceMessage.cpp:139
std::shared_ptr< DataFile > file
The file to read.
Definition: StorageServiceMessage.h:248
bool file_registry_service_updated
Whether a file registry service has been updated or not.
Definition: StorageServiceMessage.h:175
A message sent to a StorageService to delete a file.
Definition: StorageServiceMessage.h:93
std::shared_ptr< DataFile > file
The workflow file that should be written.
Definition: StorageServiceMessage.h:219
StorageServiceFileReadAnswerMessage(std::shared_ptr< DataFile >file, std::shared_ptr< FileLocation > location, bool success, std::shared_ptr< FailureCause > failure_cause, double payload)
Constructor.
Definition: StorageServiceMessage.cpp:312
double num_bytes_to_read
The number of bytes to read.
Definition: StorageServiceMessage.h:252
std::shared_ptr< FileLocation > location
The location to write the file to.
Definition: StorageServiceMessage.h:201
StorageServiceFileCopyAnswerMessage(std::shared_ptr< DataFile >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:195
StorageServiceFileReadRequestMessage(simgrid::s4u::Mailbox *answer_mailbox, simgrid::s4u::Mailbox *mailbox_to_receive_the_file_content, std::shared_ptr< DataFile >file, std::shared_ptr< FileLocation > location, double num_bytes_to_read, unsigned long buffer_size, double payload)
Constructor.
Definition: StorageServiceMessage.cpp:288
std::shared_ptr< FileLocation > location
The file location (hopefully)
Definition: StorageServiceMessage.h:74
std::shared_ptr< DataFile > file
The file was was copied, or not.
Definition: StorageServiceMessage.h:167
StorageServiceFileWriteRequestMessage(simgrid::s4u::Mailbox *answer_mailbox, std::shared_ptr< DataFile >file, std::shared_ptr< FileLocation > location, unsigned long buffer_size, double payload)
Constructor.
Definition: StorageServiceMessage.cpp:231
std::shared_ptr< FileLocation > location
The location of the file.
Definition: StorageServiceMessage.h:271
A message sent to a StorageService to read a file.
Definition: StorageServiceMessage.h:233
StorageServiceFileWriteAnswerMessage(std::shared_ptr< DataFile >file, std::shared_ptr< FileLocation > location, bool success, std::shared_ptr< FailureCause > failure_cause, simgrid::s4u::Mailbox *data_write_mailbox_name, double payload)
Constructor.
Definition: StorageServiceMessage.cpp:255
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:173
bool file_is_available
Whether the file was found.
Definition: StorageServiceMessage.h:87
std::shared_ptr< FileLocation > dst
The destination location.
Definition: StorageServiceMessage.h:148
std::shared_ptr< DataFile > file
The file that was read.
Definition: StorageServiceMessage.h:269
bool success
Whether the read operation was successful or not.
Definition: StorageServiceMessage.h:273
std::shared_ptr< DataFile > file
The file.
Definition: StorageServiceMessage.h:287