OmniSciDB  cde582ebc3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
legacylockmgr::LockMgr< MutexType, KeyType > Class Template Reference

#include <LegacyLockMgr.h>

Static Public Member Functions

static std::shared_ptr
< WrapperType< MutexType > > 
getMutex (const LockType lockType, const KeyType &key)
 

Static Private Attributes

static std::mutex aMutex_
 
static std::map< std::tuple
< LockType, KeyType >
, std::shared_ptr< WrapperType
< MutexType > > > 
mutexMap_
 

Detailed Description

template<typename MutexType, typename KeyType>
class legacylockmgr::LockMgr< MutexType, KeyType >

Definition at line 93 of file LegacyLockMgr.h.

Member Function Documentation

template<typename MutexType , typename KeyType >
std::shared_ptr< WrapperType< MutexType > > legacylockmgr::LockMgr< MutexType, KeyType >::getMutex ( const LockType  lockType,
const KeyType &  key 
)
static

Definition at line 111 of file LegacyLockMgr.h.

Referenced by DdlCommandExecutor::execute(), Parser::CreateTableStmt::execute(), Parser::CreateDataframeStmt::execute(), Parser::InsertIntoTableAsSelectStmt::execute(), Parser::CreateTableAsSelectStmt::execute(), Parser::DropTableStmt::execute(), Parser::TruncateTableStmt::execute(), Parser::OptimizeTableStmt::execute(), Parser::RenameDBStmt::execute(), Parser::RenameTableStmt::execute(), Parser::RenameColumnStmt::execute(), Parser::AddColumnStmt::execute(), Parser::DropColumnStmt::execute(), Parser::AlterTableParamStmt::execute(), Parser::DumpTableStmt::execute(), Parser::CopyTableStmt::execute(), Parser::ExportQueryStmt::execute(), Parser::CreateViewStmt::execute(), Parser::DropViewStmt::execute(), Parser::CreateDBStmt::execute(), Parser::DropDBStmt::execute(), Parser::InsertValuesStmt::execute(), DBHandler::get_table_details(), DBHandler::get_table_details_for_database(), DBHandler::get_table_epoch(), DBHandler::get_table_epoch_by_name(), DBHandler::get_table_epochs(), DBHandler::get_tables_meta(), DBHandler::import_table(), foreign_storage::ForeignTableRefreshScheduler::invalidateQueryEngineCaches(), DBHandler::load_table(), DBHandler::load_table_binary(), DBHandler::load_table_binary_arrow(), DBHandler::loadTableBinaryColumnarInternal(), DBHandler::set_table_epoch(), DBHandler::set_table_epoch_by_name(), DBHandler::set_table_epochs(), DBHandler::sql_execute_impl(), and DBHandler::sql_validate().

113  {
114  auto lock_key = std::make_tuple(lock_type, key);
115 
116  std::unique_lock<std::mutex> lck(aMutex_);
117  auto mit = mutexMap_.find(lock_key);
118  if (mit != mutexMap_.end()) {
119  return mit->second;
120  }
121 
122  auto tMutex = std::make_shared<WrapperType<MutexType>>();
123  mutexMap_[lock_key] = tMutex;
124  return tMutex;
125 }
static std::map< std::tuple< LockType, KeyType >, std::shared_ptr< WrapperType< MutexType > > > mutexMap_
static std::mutex aMutex_
Definition: LegacyLockMgr.h:99

+ Here is the caller graph for this function:

Member Data Documentation

template<typename MutexType , typename KeyType >
std::mutex legacylockmgr::LockMgr< MutexType, KeyType >::aMutex_
staticprivate

Definition at line 99 of file LegacyLockMgr.h.

template<typename MutexType , typename KeyType >
std::map< std::tuple< LockType, KeyType >, std::shared_ptr< WrapperType< MutexType > > > legacylockmgr::LockMgr< MutexType, KeyType >::mutexMap_
staticprivate

Definition at line 101 of file LegacyLockMgr.h.


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