|
CAPIO-CL 1.5.2
CAPIO-CL: Cross Application Programmable I/O - Coordination Language
|
Abstract interface for monitoring the commit state of files in CAPIO-CL. More...
#include <monitor.h>

Public Member Functions | |
| virtual | ~MonitorInterface ()=default |
| Virtual destructor for safe polymorphic deletion. | |
| virtual bool | isCommitted (const std::filesystem::path &path) const |
| Check whether the given file has been committed. | |
| virtual void | setCommitted (const std::filesystem::path &path) const |
| Mark the given file as committed. | |
| virtual void | setHomeNode (const std::filesystem::path &path) const |
| virtual std::string | getHomeNode (const std::filesystem::path &path) const |
Protected Attributes | |
| 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 | |
Abstract interface for monitoring the commit state of files in CAPIO-CL.
This class defines a common API for components that track whether files have been marked as "committed" in the CAPIO-CL runtime. Implementations may monitor commit state using different backends (e.g., filesystem signals or multicast synchronization).
The class is thread-safe through committed_lock, protecting _committed_files which stores the list of committed file paths.
|
virtual |
Get the home node for a given path as reported by the implementation of this interface
| path |
Reimplemented in capiocl::monitor::FileSystemMonitor, and capiocl::monitor::MulticastMonitor.
|
virtual |
Check whether the given file has been committed.
| path | Path to the file being queried. |
Reimplemented in capiocl::monitor::FileSystemMonitor, and capiocl::monitor::MulticastMonitor.
|
virtual |
Mark the given file as committed.
| path | Path to the file to mark as committed. |
Reimplemented in capiocl::monitor::FileSystemMonitor, and capiocl::monitor::MulticastMonitor.
|
virtual |
Set the current hostname as the home node for a given path
| path |
Reimplemented in capiocl::monitor::FileSystemMonitor, and capiocl::monitor::MulticastMonitor.