|
CAPIO-CL 1.5.2
CAPIO-CL: Cross Application Programmable I/O - Coordination Language
|
Monitor implementation that synchronizes file commit state via multicast messages. More...
#include <monitor.h>


Public Member Functions | |
| 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 |
| std::string | getHomeNode (const std::filesystem::path &path) const override |
| Public Member Functions inherited from capiocl::monitor::MonitorInterface | |
| virtual | ~MonitorInterface ()=default |
| Virtual destructor for safe polymorphic deletion. | |
Additional Inherited Members | |
| Protected Attributes inherited from capiocl::monitor::MonitorInterface | |
| 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 [HOSTNAME_BUFFER_SIZE] = {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.
| capiocl::monitor::MulticastMonitor::MulticastMonitor | ( | const capiocl::configuration::CapioClConfiguration & | config | ) |
Construct a multicast-based monitor.
| config | const reference to CAPIO-CL configuration |
|
overridevirtual |
Get the home node for a given path as reported by the implementation of this interface
| path |
Reimplemented from capiocl::monitor::MonitorInterface.
|
overridevirtual |
Check whether the given file has been committed.
| path | Path to the file being queried. |
Reimplemented from capiocl::monitor::MonitorInterface.
|
overridevirtual |
Mark the given file as committed.
| path | Path to the file to mark as committed. |
Reimplemented from capiocl::monitor::MonitorInterface.
|
overridevirtual |
Set the current hostname as the home node for a given path
| path |
Reimplemented from capiocl::monitor::MonitorInterface.