11 #ifndef WRENCH_FILEREGISTRYMESSAGE_H
12 #define WRENCH_FILEREGISTRYMESSAGE_H
16 #include "wrench/services/ServiceMessage.h"
17 #include "wrench/data_file/DataFile.h"
18 #include "wrench/services/network_proximity/NetworkProximityService.h"
19 #include "wrench/services/storage/StorageService.h"
30 class FileRegistryMessage :
public ServiceMessage {
32 FileRegistryMessage(
double payload);
39 class FileRegistryFileLookupRequestMessage :
public FileRegistryMessage {
41 FileRegistryFileLookupRequestMessage(simgrid::s4u::Mailbox *answer_mailbox, std::shared_ptr<DataFile>file,
double payload);
44 simgrid::s4u::Mailbox *answer_mailbox;
46 std::shared_ptr<DataFile>file;
52 class FileRegistryFileLookupAnswerMessage :
public FileRegistryMessage {
54 FileRegistryFileLookupAnswerMessage(std::shared_ptr<DataFile>file, std::set<std::shared_ptr<FileLocation>> locations,
58 std::shared_ptr<DataFile>file;
60 std::set<std::shared_ptr<FileLocation>> locations;
67 class FileRegistryFileLookupByProximityRequestMessage :
public FileRegistryMessage {
69 FileRegistryFileLookupByProximityRequestMessage(simgrid::s4u::Mailbox *answer_mailbox, std::shared_ptr<DataFile>file,
70 std::string reference_host,
71 std::shared_ptr<NetworkProximityService> network_proximity_service,
75 simgrid::s4u::Mailbox *answer_mailbox;
77 std::shared_ptr<DataFile>file;
85 std::string reference_host;
90 std::shared_ptr<NetworkProximityService> network_proximity_service;
97 class FileRegistryFileLookupByProximityAnswerMessage :
public FileRegistryMessage {
99 FileRegistryFileLookupByProximityAnswerMessage(std::shared_ptr<DataFile>file,
100 std::string reference_host,
101 std::map<
double, std::shared_ptr<FileLocation>> locations,
105 std::shared_ptr<DataFile>file;
113 std::string reference_host;
118 std::map<double, std::shared_ptr<FileLocation>> locations;
124 class FileRegistryRemoveEntryRequestMessage :
public FileRegistryMessage {
126 FileRegistryRemoveEntryRequestMessage(simgrid::s4u::Mailbox *answer_mailbox, std::shared_ptr<DataFile>file,
127 std::shared_ptr<FileLocation> location,
double payload);
130 simgrid::s4u::Mailbox *answer_mailbox;
132 std::shared_ptr<DataFile>file;
134 std::shared_ptr<FileLocation> location;
140 class FileRegistryRemoveEntryAnswerMessage :
public FileRegistryMessage {
142 FileRegistryRemoveEntryAnswerMessage(
bool success,
double payload);
151 class FileRegistryAddEntryRequestMessage :
public FileRegistryMessage {
153 FileRegistryAddEntryRequestMessage(simgrid::s4u::Mailbox *answer_mailbox, std::shared_ptr<DataFile>file,
154 std::shared_ptr<FileLocation> location,
double payload);
157 simgrid::s4u::Mailbox *answer_mailbox;
159 std::shared_ptr<DataFile>file;
161 std::shared_ptr<FileLocation> location;
167 class FileRegistryAddEntryAnswerMessage :
public FileRegistryMessage {
169 FileRegistryAddEntryAnswerMessage(
double payload);
178 #endif //WRENCH_FILEREGISTRYMESSAGE_H