OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
legacylockmgr::WrapperType< MutexType > Class Template Referencefinal

#include <LegacyLockMgr.h>

+ Collaboration diagram for legacylockmgr::WrapperType< MutexType >:

Public Member Functions

 WrapperType ()
 
void lock ()
 
bool try_lock ()
 
void unlock ()
 
void lock_shared ()
 
bool try_lock_shared ()
 
void unlock_shared ()
 

Private Attributes

MutexType mutex_
 
heavyai::DistributedSharedMutex dmutex_
 

Detailed Description

template<typename MutexType>
class legacylockmgr::WrapperType< MutexType >

Definition at line 37 of file LegacyLockMgr.h.

Constructor & Destructor Documentation

template<typename MutexType >
legacylockmgr::WrapperType< MutexType >::WrapperType ( )
inline

Definition at line 39 of file LegacyLockMgr.h.

40  : dmutex_(std::filesystem::path(g_base_path) / shared::kLockfilesDirectoryName /
41  "global.lockfile") {}
heavyai::DistributedSharedMutex dmutex_
Definition: LegacyLockMgr.h:89
std::string g_base_path
Definition: SysCatalog.cpp:62
const std::string kLockfilesDirectoryName

Member Function Documentation

template<typename MutexType >
void legacylockmgr::WrapperType< MutexType >::lock ( )
inline

Definition at line 43 of file LegacyLockMgr.h.

References legacylockmgr::WrapperType< MutexType >::dmutex_, g_multi_instance, heavyai::DistributedSharedMutex::lock(), and legacylockmgr::WrapperType< MutexType >::mutex_.

43  {
44  if (!g_multi_instance) {
45  mutex_.lock();
46  } else {
47  dmutex_.lock();
48  }
49  }
bool g_multi_instance
Definition: heavyai_locks.h:22
heavyai::DistributedSharedMutex dmutex_
Definition: LegacyLockMgr.h:89

+ Here is the call graph for this function:

template<typename MutexType >
void legacylockmgr::WrapperType< MutexType >::lock_shared ( )
inline

Definition at line 65 of file LegacyLockMgr.h.

References legacylockmgr::WrapperType< MutexType >::dmutex_, g_multi_instance, heavyai::DistributedSharedMutex::lock_shared(), and legacylockmgr::WrapperType< MutexType >::mutex_.

65  {
66  if (!g_multi_instance) {
67  mutex_.lock_shared();
68  } else {
70  }
71  }
bool g_multi_instance
Definition: heavyai_locks.h:22
heavyai::DistributedSharedMutex dmutex_
Definition: LegacyLockMgr.h:89

+ Here is the call graph for this function:

template<typename MutexType >
bool legacylockmgr::WrapperType< MutexType >::try_lock ( )
inline

Definition at line 50 of file LegacyLockMgr.h.

References legacylockmgr::WrapperType< MutexType >::dmutex_, g_multi_instance, legacylockmgr::WrapperType< MutexType >::mutex_, and heavyai::DistributedSharedMutex::try_lock().

50  {
51  if (!g_multi_instance) {
52  return mutex_.try_lock();
53  } else {
54  return dmutex_.try_lock();
55  }
56  }
bool g_multi_instance
Definition: heavyai_locks.h:22
heavyai::DistributedSharedMutex dmutex_
Definition: LegacyLockMgr.h:89

+ Here is the call graph for this function:

template<typename MutexType >
bool legacylockmgr::WrapperType< MutexType >::try_lock_shared ( )
inline

Definition at line 72 of file LegacyLockMgr.h.

References legacylockmgr::WrapperType< MutexType >::dmutex_, g_multi_instance, legacylockmgr::WrapperType< MutexType >::mutex_, and heavyai::DistributedSharedMutex::try_lock_shared().

72  {
73  if (!g_multi_instance) {
74  return mutex_.try_lock_shared();
75  } else {
76  return dmutex_.try_lock_shared();
77  }
78  }
bool g_multi_instance
Definition: heavyai_locks.h:22
heavyai::DistributedSharedMutex dmutex_
Definition: LegacyLockMgr.h:89

+ Here is the call graph for this function:

template<typename MutexType >
void legacylockmgr::WrapperType< MutexType >::unlock ( )
inline

Definition at line 57 of file LegacyLockMgr.h.

References legacylockmgr::WrapperType< MutexType >::dmutex_, g_multi_instance, legacylockmgr::WrapperType< MutexType >::mutex_, and heavyai::DistributedSharedMutex::unlock().

57  {
58  if (!g_multi_instance) {
59  mutex_.unlock();
60  } else {
61  dmutex_.unlock();
62  }
63  }
bool g_multi_instance
Definition: heavyai_locks.h:22
heavyai::DistributedSharedMutex dmutex_
Definition: LegacyLockMgr.h:89

+ Here is the call graph for this function:

template<typename MutexType >
void legacylockmgr::WrapperType< MutexType >::unlock_shared ( )
inline

Definition at line 79 of file LegacyLockMgr.h.

References legacylockmgr::WrapperType< MutexType >::dmutex_, g_multi_instance, legacylockmgr::WrapperType< MutexType >::mutex_, and heavyai::DistributedSharedMutex::unlock_shared().

79  {
80  if (!g_multi_instance) {
81  mutex_.unlock_shared();
82  } else {
84  }
85  }
bool g_multi_instance
Definition: heavyai_locks.h:22
heavyai::DistributedSharedMutex dmutex_
Definition: LegacyLockMgr.h:89

+ Here is the call graph for this function:

Member Data Documentation


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