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 
31  protected:
33 
34  };
35 
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 
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 
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 
98  public:
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 
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 
141  public:
143 
145  bool success;
146  };
147 
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 
168  public:
170  };
171 
172  /***********************/
174  /***********************/
175 };
176 
177 
178 #endif //WRENCH_FILEREGISTRYMESSAGE_H
wrench::FileRegistryRemoveEntryRequestMessage::location
std::shared_ptr< FileLocation > location
The location to remove.
Definition: FileRegistryMessage.h:134
wrench::FileRegistryFileLookupByProximityRequestMessage::FileRegistryFileLookupByProximityRequestMessage
FileRegistryFileLookupByProximityRequestMessage(simgrid::s4u::Mailbox *answer_mailbox, std::shared_ptr< DataFile >file, std::string reference_host, std::shared_ptr< NetworkProximityService > network_proximity_service, double payload)
Constructor.
Definition: FileRegistryMessage.cpp:67
wrench::FileRegistryFileLookupByProximityAnswerMessage::locations
std::map< double, std::shared_ptr< FileLocation > > locations
A map of all locations where the file resides sorted with respect to their distance from the host 'ho...
Definition: FileRegistryMessage.h:118
wrench::FileRegistryMessage
Top-level FileRegistryMessage class.
Definition: FileRegistryMessage.h:30
wrench::FileRegistryAddEntryRequestMessage::FileRegistryAddEntryRequestMessage
FileRegistryAddEntryRequestMessage(simgrid::s4u::Mailbox *answer_mailbox, std::shared_ptr< DataFile >file, std::shared_ptr< FileLocation > location, double payload)
Constructor.
Definition: FileRegistryMessage.cpp:140
wrench::FileRegistryFileLookupByProximityRequestMessage::file
std::shared_ptr< DataFile > file
The file to lookup.
Definition: FileRegistryMessage.h:77
wrench::FileRegistryRemoveEntryAnswerMessage::FileRegistryRemoveEntryAnswerMessage
FileRegistryRemoveEntryAnswerMessage(bool success, double payload)
Constructor.
Definition: FileRegistryMessage.cpp:127
wrench::FileRegistryFileLookupByProximityAnswerMessage::reference_host
std::string reference_host
The host from which network proximity will be measured from. If 'host_to_measure_from' is host 'A',...
Definition: FileRegistryMessage.h:113
wrench::FileRegistryFileLookupAnswerMessage
A message sent by a FileRegistryService in answer to a file lookup request.
Definition: FileRegistryMessage.h:52
wrench::FileRegistryFileLookupByProximityRequestMessage::reference_host
std::string reference_host
The host from which network proximity will be measured from. If 'host_to_measure_from' is host 'A',...
Definition: FileRegistryMessage.h:85
wrench::FileRegistryFileLookupByProximityRequestMessage::network_proximity_service
std::shared_ptr< NetworkProximityService > network_proximity_service
The network proximity service to be used.
Definition: FileRegistryMessage.h:90
wrench::FileRegistryFileLookupRequestMessage::answer_mailbox
simgrid::s4u::Mailbox * answer_mailbox
The mailbox to which the answer message should be sent.
Definition: FileRegistryMessage.h:44
wrench::FileRegistryAddEntryRequestMessage
A message sent to a FileRegistryService to request the addition of an entry.
Definition: FileRegistryMessage.h:151
wrench::FileRegistryFileLookupByProximityAnswerMessage
A message sent by a FileRegistryService in answer to a file lookup request, in which file locations a...
Definition: FileRegistryMessage.h:97
wrench::ServiceMessage
Top-level class for messages received/sent by a Service.
Definition: ServiceMessage.h:27
wrench::FileRegistryAddEntryRequestMessage::file
std::shared_ptr< DataFile > file
The file for which to add an entry.
Definition: FileRegistryMessage.h:159
wrench::FileRegistryFileLookupRequestMessage::FileRegistryFileLookupRequestMessage
FileRegistryFileLookupRequestMessage(simgrid::s4u::Mailbox *answer_mailbox, std::shared_ptr< DataFile >file, double payload)
Constructor.
Definition: FileRegistryMessage.cpp:31
wrench::FileRegistryAddEntryAnswerMessage
A message sent by a FileRegistryService in answer to an entry addition request.
Definition: FileRegistryMessage.h:167
wrench::FileRegistryRemoveEntryAnswerMessage
A message sent by a FileRegistryService in answer to an entry removal request.
Definition: FileRegistryMessage.h:140
wrench
Definition: Action.cpp:28
wrench::FileRegistryRemoveEntryRequestMessage::answer_mailbox
simgrid::s4u::Mailbox * answer_mailbox
The mailbox to which the answer message should be sent.
Definition: FileRegistryMessage.h:130
wrench::FileRegistryRemoveEntryRequestMessage::FileRegistryRemoveEntryRequestMessage
FileRegistryRemoveEntryRequestMessage(simgrid::s4u::Mailbox *answer_mailbox, std::shared_ptr< DataFile >file, std::shared_ptr< FileLocation > location, double payload)
Constructor.
Definition: FileRegistryMessage.cpp:110
wrench::FileRegistryFileLookupByProximityAnswerMessage::file
std::shared_ptr< DataFile > file
The file to lookup.
Definition: FileRegistryMessage.h:105
wrench::FileRegistryAddEntryAnswerMessage::FileRegistryAddEntryAnswerMessage
FileRegistryAddEntryAnswerMessage(double payload)
Constructor.
Definition: FileRegistryMessage.cpp:155
wrench::SimulationMessage::payload
double payload
The message name.
Definition: SimulationMessage.h:40
wrench::FileRegistryAddEntryRequestMessage::location
std::shared_ptr< FileLocation > location
The location in that entry.
Definition: FileRegistryMessage.h:161
wrench::FileRegistryFileLookupAnswerMessage::FileRegistryFileLookupAnswerMessage
FileRegistryFileLookupAnswerMessage(std::shared_ptr< DataFile >file, std::set< std::shared_ptr< FileLocation >> locations, double payload)
Constructor.
Definition: FileRegistryMessage.cpp:47
wrench::FileRegistryFileLookupByProximityRequestMessage
A message sent to a FileRegistryService to request a file lookup, expecting a reply in which file loc...
Definition: FileRegistryMessage.h:67
wrench::FileRegistryRemoveEntryAnswerMessage::success
bool success
Whether the entry removal was successful or not.
Definition: FileRegistryMessage.h:145
wrench::FileRegistryFileLookupRequestMessage::file
std::shared_ptr< DataFile > file
The file to lookup.
Definition: FileRegistryMessage.h:46
wrench::FileRegistryFileLookupByProximityRequestMessage::answer_mailbox
simgrid::s4u::Mailbox * answer_mailbox
The mailbox to which the answer message should be sent.
Definition: FileRegistryMessage.h:75
wrench::FileRegistryRemoveEntryRequestMessage::file
std::shared_ptr< DataFile > file
The file for which one entry should be removed.
Definition: FileRegistryMessage.h:132
wrench::FileRegistryFileLookupAnswerMessage::file
std::shared_ptr< DataFile > file
The file that was looked up.
Definition: FileRegistryMessage.h:58
wrench::FileRegistryAddEntryRequestMessage::answer_mailbox
simgrid::s4u::Mailbox * answer_mailbox
The mailbox to which the answer message should be sent.
Definition: FileRegistryMessage.h:157
wrench::FileRegistryFileLookupAnswerMessage::locations
std::set< std::shared_ptr< FileLocation > > locations
A (possibly empty) set of file locations.
Definition: FileRegistryMessage.h:60
wrench::FileRegistryFileLookupRequestMessage
A message sent to a FileRegistryService to request a file lookup.
Definition: FileRegistryMessage.h:39
wrench::FileRegistryMessage::FileRegistryMessage
FileRegistryMessage(double payload)
Constructor.
Definition: FileRegistryMessage.cpp:20
wrench::FileRegistryRemoveEntryRequestMessage
A message sent to a FileRegistryService to request the removal of an entry.
Definition: FileRegistryMessage.h:124
wrench::FileRegistryFileLookupByProximityAnswerMessage::FileRegistryFileLookupByProximityAnswerMessage
FileRegistryFileLookupByProximityAnswerMessage(std::shared_ptr< DataFile >file, std::string reference_host, std::map< double, std::shared_ptr< FileLocation >> locations, double payload)
Constructor.
Definition: FileRegistryMessage.cpp:89