Class MHO_LockFileHandler uses the singleton pattern.
More...
#include <MHO_LockFileHandler.hh>
Class MHO_LockFileHandler uses the singleton pattern.
ported version of fourfit write lock mechanism the only three functions user needs to call via the instance: (1) enable/disable legacy mode (2) wait for lock
- Author
- J. Barrett - barre.nosp@m.ttj@.nosp@m.mit.e.nosp@m.du
- Date
- Tue Jan 30 23:48:59 2024 -0500
- write out the data file (3) remove lock
◆ MHO_LockFileHandler() [1/2]
◆ MHO_LockFileHandler() [2/2]
◆ DisableLegacyMode()
void hops::MHO_LockFileHandler::DisableLegacyMode |
( |
| ) |
|
|
inline |
Disables legacy mode by setting fEnableLegacyMode to false.
◆ EnableLegacyMode()
void hops::MHO_LockFileHandler::EnableLegacyMode |
( |
| ) |
|
|
inline |
configure the lock handler to write legacy type_2xx file (e.g. GE.X.1.ABCDEF) naming convention. or to use the new file naming convention (.frng extension) legacy mode is enabled by default
◆ GetInstance()
provide public access to the only static instance
- Returns
- Reference to the singleton instance of MHO_LockFileHandler
- Note
- This is a static function.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ RemoveWriteLock()
void hops::MHO_LockFileHandler::RemoveWriteLock |
( |
| ) |
|
Removes a write lock from the file.
◆ WaitForWriteLock()
int hops::MHO_LockFileHandler::WaitForWriteLock |
( |
std::string |
directory, |
|
|
int & |
next_seq_no |
|
) |
| |
Waits for and acquires a write lock on the specified directory, setting it as the current directory.
- Parameters
-
directory | The directory to acquire the write lock on. |
next_seq_no | (int&) |
- Returns
- An integer representing the result of the operation.
The documentation for this class was generated from the following files: