Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::detail::Pid_File_Lock Class Reference

#include <tpl_paged_tree_durability.H>

Collaboration diagram for Aleph::detail::Pid_File_Lock:
[legend]

Classes

struct  Local_Lock_State
 

Public Member Functions

 Pid_File_Lock ()=default
 
 Pid_File_Lock (const Pid_File_Lock &)=delete
 
Pid_File_Lockoperator= (const Pid_File_Lock &)=delete
 
 Pid_File_Lock (Pid_File_Lock &&)=delete
 
Pid_File_Lockoperator= (Pid_File_Lock &&)=delete
 
 ~Pid_File_Lock () noexcept
 
void acquire (const std::string &path, const char *kind, const Pid_File_Lock_Mode mode=Pid_File_Lock_Mode::Exclusive)
 
void release () noexcept
 

Static Private Member Functions

static std::mutex & registry_mutex ()
 
static std::vector< Local_Lock_State > & registry ()
 
static void register_path (const std::string &path, const Pid_File_Lock_Mode mode, const char *kind)
 
static void unregister_path (const std::string &path, const Pid_File_Lock_Mode mode) noexcept
 
static bool stale_lock (const std::string &path)
 

Private Attributes

std::string path_
 
bool acquired_ = false
 
Pid_File_Lock_Mode mode_ = Pid_File_Lock_Mode::Exclusive
 

Detailed Description

Definition at line 268 of file tpl_paged_tree_durability.H.

Constructor & Destructor Documentation

◆ Pid_File_Lock() [1/3]

Aleph::detail::Pid_File_Lock::Pid_File_Lock ( )
default

◆ Pid_File_Lock() [2/3]

Aleph::detail::Pid_File_Lock::Pid_File_Lock ( const Pid_File_Lock )
delete

◆ Pid_File_Lock() [3/3]

Aleph::detail::Pid_File_Lock::Pid_File_Lock ( Pid_File_Lock &&  )
delete

◆ ~Pid_File_Lock()

Aleph::detail::Pid_File_Lock::~Pid_File_Lock ( )
inlinenoexcept

Definition at line 420 of file tpl_paged_tree_durability.H.

References release().

Member Function Documentation

◆ acquire()

◆ operator=() [1/2]

Pid_File_Lock & Aleph::detail::Pid_File_Lock::operator= ( const Pid_File_Lock )
delete

◆ operator=() [2/2]

Pid_File_Lock & Aleph::detail::Pid_File_Lock::operator= ( Pid_File_Lock &&  )
delete

◆ register_path()

◆ registry()

static std::vector< Local_Lock_State > & Aleph::detail::Pid_File_Lock::registry ( )
inlinestaticprivate

Definition at line 290 of file tpl_paged_tree_durability.H.

Referenced by register_path(), and unregister_path().

◆ registry_mutex()

static std::mutex & Aleph::detail::Pid_File_Lock::registry_mutex ( )
inlinestaticprivate

Definition at line 284 of file tpl_paged_tree_durability.H.

Referenced by register_path(), and unregister_path().

◆ release()

void Aleph::detail::Pid_File_Lock::release ( )
inlinenoexcept

◆ stale_lock()

static bool Aleph::detail::Pid_File_Lock::stale_lock ( const std::string &  path)
inlinestaticprivate

◆ unregister_path()

static void Aleph::detail::Pid_File_Lock::unregister_path ( const std::string &  path,
const Pid_File_Lock_Mode  mode 
)
inlinestaticprivatenoexcept

Member Data Documentation

◆ acquired_

bool Aleph::detail::Pid_File_Lock::acquired_ = false
private

Definition at line 278 of file tpl_paged_tree_durability.H.

Referenced by acquire(), and release().

◆ mode_

Pid_File_Lock_Mode Aleph::detail::Pid_File_Lock::mode_ = Pid_File_Lock_Mode::Exclusive
private

Definition at line 279 of file tpl_paged_tree_durability.H.

Referenced by acquire(), and release().

◆ path_

std::string Aleph::detail::Pid_File_Lock::path_
private

Definition at line 277 of file tpl_paged_tree_durability.H.

Referenced by acquire(), and release().


The documentation for this class was generated from the following file: