SWC-DB  v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
SWC::Core::MutexSptd Class Referencefinal

#include <swcdb/core/MutexSptd.h>

+ Inheritance diagram for SWC::Core::MutexSptd:
+ Collaboration diagram for SWC::Core::MutexSptd:

Classes

class  scope
 
class  scope_except
 

Public Member Functions

SWC_CAN_INLINE MutexSptd () noexcept
 
 MutexSptd (const MutexSptd &)=delete
 
 MutexSptd (MutexSptd &&)=delete
 
MutexSptdoperator= (const MutexSptd &)=delete
 
MutexSptdoperator= (MutexSptd &&)=delete
 
 ~MutexSptd () noexcept
 
SWC_CAN_INLINE bool lock_except ()
 
SWC_CAN_INLINE bool lock () noexcept
 
bool try_full_lock (bool &support) noexcept
 
SWC_CAN_INLINE void unlock (const bool &support) noexcept
 

Private Attributes

std::mutex m_mutex
 

Additional Inherited Members

- Private Member Functions inherited from SWC::Core::MutexAtomic
constexpr SWC_CAN_INLINE MutexAtomic () noexcept
 
 MutexAtomic (const MutexAtomic &)=delete
 
 MutexAtomic (MutexAtomic &&)=delete
 
MutexAtomicoperator= (const MutexAtomic &)=delete
 
MutexAtomicoperator= (MutexAtomic &&)=delete
 
 ~MutexAtomic () noexcept
 
SWC_CAN_INLINE bool try_lock () const noexcept
 
SWC_CAN_INLINE void lock () const noexcept
 
void lock (const uint32_t &us_sleep) const noexcept
 
SWC_CAN_INLINE void unlock () const noexcept
 

Detailed Description

Definition at line 16 of file MutexSptd.h.

Constructor & Destructor Documentation

◆ MutexSptd() [1/3]

SWC_CAN_INLINE SWC::Core::MutexSptd::MutexSptd ( )
inlineexplicitnoexcept

Definition at line 20 of file MutexSptd.h.

◆ MutexSptd() [2/3]

SWC::Core::MutexSptd::MutexSptd ( const MutexSptd )
delete

◆ MutexSptd() [3/3]

SWC::Core::MutexSptd::MutexSptd ( MutexSptd &&  )
delete

◆ ~MutexSptd()

SWC::Core::MutexSptd::~MutexSptd ( )
inlinenoexcept

Definition at line 27 of file MutexSptd.h.

Member Function Documentation

◆ lock()

SWC_CAN_INLINE bool SWC::Core::MutexSptd::lock ( )
inlinenoexcept

Definition at line 39 of file MutexSptd.h.

References SWC::Core::MutexAtomic::lock(), m_mutex, and SWC::Core::MutexAtomic::try_lock().

Referenced by SWC::client::Mngr::Groups::on_cfg_update(), and SWC::Ranger::Blocks::scan().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lock_except()

SWC_CAN_INLINE bool SWC::Core::MutexSptd::lock_except ( )
inline

Definition at line 30 of file MutexSptd.h.

References SWC::Core::MutexAtomic::lock(), m_mutex, and SWC::Core::MutexAtomic::try_lock().

+ Here is the call graph for this function:

◆ operator=() [1/2]

MutexSptd& SWC::Core::MutexSptd::operator= ( const MutexSptd )
delete

◆ operator=() [2/2]

MutexSptd& SWC::Core::MutexSptd::operator= ( MutexSptd &&  )
delete

◆ try_full_lock()

bool SWC::Core::MutexSptd::try_full_lock ( bool &  support)
inlinenoexcept

Definition at line 55 of file MutexSptd.h.

References m_mutex, and SWC::Core::MutexAtomic::try_lock().

Referenced by SWC::Ranger::Blocks::_split(), SWC::Manager::RangersResources::check(), SWC::Manager::Rangers::health_check_columns(), SWC::Ranger::CellStore::Block::Read::processing(), SWC::Ranger::CommitLog::Fragment::processing(), SWC::Ranger::Block::processing(), SWC::Ranger::Blocks::processing(), SWC::Ranger::CellStore::Block::Read::release(), SWC::Ranger::CommitLog::Fragment::release(), SWC::Ranger::Block::release(), SWC::Ranger::Blocks::release(), and SWC::Ranger::Blocks::scan().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unlock()

SWC_CAN_INLINE void SWC::Core::MutexSptd::unlock ( const bool &  support)
inlinenoexcept

Member Data Documentation

◆ m_mutex

std::mutex SWC::Core::MutexSptd::m_mutex
private

Definition at line 116 of file MutexSptd.h.

Referenced by lock(), lock_except(), try_full_lock(), and unlock().


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