FileRegistryMessage.h
1 
11 #ifndef WRENCH_FILEREGISTRYMESSAGE_H
12 #define WRENCH_FILEREGISTRYMESSAGE_H
13 
14 
15 #include <wrench/services/ServiceMessage.h>
16 #include <iostream>
17 #include <wrench/services/network_proximity/NetworkProximityService.h>
18 
19 namespace wrench {
20 
21  /***********************/
23  /***********************/
24 
29  protected:
30  FileRegistryMessage(std::string name, double payload);
31 
32  };
33 
38  public:
39  FileRegistryFileLookupRequestMessage(std::string answer_mailbox, WorkflowFile *file, double payload);
40 
42  std::string answer_mailbox;
45  };
46 
51  public:
52  FileRegistryFileLookupAnswerMessage(WorkflowFile *file, std::set<StorageService *> locations, double payload);
53 
57  std::set<StorageService *> locations;
58  };
59 
65  public:
66  FileRegistryFileLookupByProximityRequestMessage(std::string answer_mailbox, WorkflowFile *file,
67  std::string reference_host,
68  NetworkProximityService *network_proximity_service, double payload);
69 
71  std::string answer_mailbox;
81  std::string reference_host;
82 
87  };
88 
94  public:
96  std::string reference_host,
97  std::map<double, StorageService *> locations,
98  double payload);
99 
109  std::string reference_host;
114  std::map<double, StorageService *> locations;
115  };
116 
121  public:
122  FileRegistryRemoveEntryRequestMessage(std::string answer_mailbox, WorkflowFile *file,
123  StorageService *storage_service, double payload);
124 
126  std::string answer_mailbox;
131  };
132 
137  public:
138  FileRegistryRemoveEntryAnswerMessage(bool success, double payload);
139 
141  bool success;
142  };
143 
148  public:
149  FileRegistryAddEntryRequestMessage(std::string answer_mailbox, WorkflowFile *file,
150  StorageService *storage_service, double payload);
151 
153  std::string answer_mailbox;
158  };
159 
164  public:
166  };
167 
168  /***********************/
170  /***********************/
171 };
172 
173 
174 #endif //WRENCH_FILEREGISTRYMESSAGE_H
bool success
Whether the entry removal was successful or not.
Definition: FileRegistryMessage.h:141
A message sent to a FileRegistryService to request the removal of an entry.
Definition: FileRegistryMessage.h:120
A message sent by a FileRegistryService in answer to an entry removal request.
Definition: FileRegistryMessage.h:136
WorkflowFile * file
The file for which one entry should be removed.
Definition: FileRegistryMessage.h:128
std::map< double, StorageService * > locations
A map of all locations where the file resides sorted with respect to their distance from the host &#39;ho...
Definition: FileRegistryMessage.h:114
std::string answer_mailbox
The mailbox to which the answer message should be sent.
Definition: FileRegistryMessage.h:126
double payload
The message size in bytes.
Definition: SimulationMessage.h:39
A message sent by a FileRegistryService in answer to a file lookup request, in which file locations a...
Definition: FileRegistryMessage.h:93
std::string answer_mailbox
The mailbox to which the answer message should be sent.
Definition: FileRegistryMessage.h:153
std::string answer_mailbox
The mailbox to which the answer message should be sent.
Definition: FileRegistryMessage.h:71
A data file used/produced by a WorkflowTask in a Workflow.
Definition: WorkflowFile.h:26
std::string name
The message name.
Definition: SimulationMessage.h:37
A message sent by a FileRegistryService in answer to a file lookup request.
Definition: FileRegistryMessage.h:50
std::string reference_host
The host from which network proximity will be measured from. If &#39;host_to_measure_from&#39; is host &#39;A&#39;...
Definition: FileRegistryMessage.h:81
A message sent to a FileRegistryService to request a file lookup.
Definition: FileRegistryMessage.h:37
WorkflowFile * file
The file for which to add an entry.
Definition: FileRegistryMessage.h:155
Top-level class for messages received/sent by a Service.
Definition: ServiceMessage.h:27
NetworkProximityService * network_proximity_service
The network proximity service to be used.
Definition: FileRegistryMessage.h:86
StorageService * storage_service
The storage service of the entry to remove.
Definition: FileRegistryMessage.h:130
A network proximity service that continuously estimates inter-host latencies and can be queried for s...
Definition: NetworkProximityService.h:26
std::string answer_mailbox
The mailbox to which the answer message should be sent.
Definition: FileRegistryMessage.h:42
A message sent to a FileRegistryService to request the addition of an entry.
Definition: FileRegistryMessage.h:147
WorkflowFile * file
The file to lookup.
Definition: FileRegistryMessage.h:44
std::string reference_host
The host from which network proximity will be measured from. If &#39;host_to_measure_from&#39; is host &#39;A&#39;...
Definition: FileRegistryMessage.h:109
A message sent by a FileRegistryService in answer to an entry addition request.
Definition: FileRegistryMessage.h:163
WorkflowFile * file
The file that was looked up.
Definition: FileRegistryMessage.h:55
WorkflowFile * file
The file to lookup.
Definition: FileRegistryMessage.h:101
FileRegistryMessage(std::string name, double payload)
Constructor.
Definition: FileRegistryMessage.cpp:20
WorkflowFile * file
The file to lookup.
Definition: FileRegistryMessage.h:73
The storage service base class.
Definition: StorageService.h:35
StorageService * storage_service
The storage service in that entry.
Definition: FileRegistryMessage.h:157
std::set< StorageService * > locations
The (possibly empty) set of storage services where the file was found.
Definition: FileRegistryMessage.h:57
A message sent to a FileRegistryService to request a file lookup, expecting a reply in which file loc...
Definition: FileRegistryMessage.h:64
Definition: TerminalOutput.cpp:15
Top-level FileRegistryMessage class.
Definition: FileRegistryMessage.h:28