|
| | MulticastMonitor (const capiocl::configuration::CapioClConfiguration &config) |
| | Construct a multicast-based monitor.
|
|
| ~MulticastMonitor () override |
| | Destructor; stops listener thread and cleans resources.
|
| bool | isCommitted (const std::filesystem::path &path) const override |
| | Check whether the given file has been committed.
|
| void | setCommitted (const std::filesystem::path &path) const override |
| | Mark the given file as committed.
|
| void | setHomeNode (const std::filesystem::path &path) const override |
| const std::string & | getHomeNode (const std::filesystem::path &path) const override |
|
virtual | ~MonitorInterface ()=default |
| | Virtual destructor for safe polymorphic deletion.
|
|
|
std::mutex | committed_lock |
| | Mutex protecting access to the committed file list.
|
|
std::mutex | home_node_lock |
| | Mutex protecting access to the home nodes list.
|
|
std::vector< std::string > | _committed_files |
| | List of committed file paths stored as strings.
|
|
std::unordered_map< std::string, std::string > | _home_nodes |
| | Lookup table to get home node staring from path. Key = file path; Value = hostname of home node.
|
|
char | _hostname [HOST_NAME_MAX] = {0} |
| | hostname of the current instance
|
Monitor implementation that synchronizes file commit state via multicast messages.
MulticastMonitor exchanges commit events between distributed processes using multicast network messages. When one process commits a file, it broadcasts a message so that other collaborators update their commit state.
A background thread (commit_listener_thread) listens for notifications from the network to update the internal commit list.