WRENCH  1.11
Cyberinfrastructure Simulation Workbench
Overview Installation Getting Started WRENCH 101 WRENCH 102
FileRegistryMessage.h
1 
11 #ifndef WRENCH_FILEREGISTRYMESSAGE_H
12 #define WRENCH_FILEREGISTRYMESSAGE_H
13 
14 
15 #include <iostream>
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"
20 
21 namespace wrench {
22 
23  /***********************/
25  /***********************/
26 
30  class FileRegistryMessage : public ServiceMessage {
31  protected:
32  FileRegistryMessage(double payload);
33 
34  };
35 
39  class FileRegistryFileLookupRequestMessage : public FileRegistryMessage {
40  public:
41  FileRegistryFileLookupRequestMessage(simgrid::s4u::Mailbox *answer_mailbox, std::shared_ptr<DataFile>file, double payload);
42 
44  simgrid::s4u::Mailbox *answer_mailbox;
46  std::shared_ptr<DataFile>file;
47  };
48 
52  class FileRegistryFileLookupAnswerMessage : public FileRegistryMessage {
53  public:
54  FileRegistryFileLookupAnswerMessage(std::shared_ptr<DataFile>file, std::set<std::shared_ptr<FileLocation>> locations,
55  double payload);
56 
58  std::shared_ptr<DataFile>file;
60  std::set<std::shared_ptr<FileLocation>> locations;
61  };
62 
67  class FileRegistryFileLookupByProximityRequestMessage : public FileRegistryMessage {
68  public:
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,
72  double payload);
73 
75  simgrid::s4u::Mailbox *answer_mailbox;
77  std::shared_ptr<DataFile>file;
85  std::string reference_host;
86 
90  std::shared_ptr<NetworkProximityService> network_proximity_service;
91  };
92 
97  class FileRegistryFileLookupByProximityAnswerMessage : public FileRegistryMessage {
98  public:
99  FileRegistryFileLookupByProximityAnswerMessage(std::shared_ptr<DataFile>file,
100  std::string reference_host,
101  std::map<double, std::shared_ptr<FileLocation>> locations,
102  double payload);
103 
105  std::shared_ptr<DataFile>file;
113  std::string reference_host;
118  std::map<double, std::shared_ptr<FileLocation>> locations;
119  };
120 
124  class FileRegistryRemoveEntryRequestMessage : public FileRegistryMessage {
125  public:
126  FileRegistryRemoveEntryRequestMessage(simgrid::s4u::Mailbox *answer_mailbox, std::shared_ptr<DataFile>file,
127  std::shared_ptr<FileLocation> location, double payload);
128 
130  simgrid::s4u::Mailbox *answer_mailbox;
132  std::shared_ptr<DataFile>file;
134  std::shared_ptr<FileLocation> location;
135  };
136 
140  class FileRegistryRemoveEntryAnswerMessage : public FileRegistryMessage {
141  public:
142  FileRegistryRemoveEntryAnswerMessage(bool success, double payload);
143 
145  bool success;
146  };
147 
151  class FileRegistryAddEntryRequestMessage : public FileRegistryMessage {
152  public:
153  FileRegistryAddEntryRequestMessage(simgrid::s4u::Mailbox *answer_mailbox, std::shared_ptr<DataFile>file,
154  std::shared_ptr<FileLocation> location, double payload);
155 
157  simgrid::s4u::Mailbox *answer_mailbox;
159  std::shared_ptr<DataFile>file;
161  std::shared_ptr<FileLocation> location;
162  };
163 
167  class FileRegistryAddEntryAnswerMessage : public FileRegistryMessage {
168  public:
169  FileRegistryAddEntryAnswerMessage(double payload);
170  };
171 
172  /***********************/
174  /***********************/
175 };
176 
177 
178 #endif //WRENCH_FILEREGISTRYMESSAGE_H
wrench
Definition: Action.cpp:28