OmniSciDB  340b00dbf6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
lockmgr::TableSchemaLockContainer< WriteLock > Class Template Reference

#include <LockMgr.h>

+ Inheritance diagram for lockmgr::TableSchemaLockContainer< WriteLock >:
+ Collaboration diagram for lockmgr::TableSchemaLockContainer< WriteLock >:

Static Public Member Functions

static auto acquireTableDescriptor (const Catalog_Namespace::Catalog &cat, const std::string &table_name, const bool populate_fragmenter=true)
 
static auto acquireTableDescriptor (const Catalog_Namespace::Catalog &cat, const int table_id)
 

Private Member Functions

 TableSchemaLockContainer (const TableDescriptor *obj, WriteLock &&lock)
 

Additional Inherited Members

- Public Member Functions inherited from lockmgr::LockContainerImpl< const TableDescriptor *, WriteLock >
const TableDescriptoroperator() () const final
 
- Public Member Functions inherited from lockmgr::AbstractLockContainer< const TableDescriptor * >
virtual ~AbstractLockContainer ()
 
- Protected Member Functions inherited from lockmgr::LockContainerImpl< const TableDescriptor *, WriteLock >
 LockContainerImpl (const TableDescriptor *obj, WriteLock &&lock)
 
- Protected Member Functions inherited from lockmgr::TableLockContainerImpl
 TableLockContainerImpl (const std::string &table_name)
 
- Protected Attributes inherited from lockmgr::LockContainerImpl< const TableDescriptor *, WriteLock >
const TableDescriptorobj_
 
WriteLock lock_
 
- Protected Attributes inherited from lockmgr::TableLockContainerImpl
std::string table_name_
 

Detailed Description

template<>
class lockmgr::TableSchemaLockContainer< WriteLock >

Definition at line 138 of file LockMgr.h.

Constructor & Destructor Documentation

Definition at line 164 of file LockMgr.h.

165  : LockContainerImpl<const TableDescriptor*, WriteLock>(obj, std::move(lock))
166  , TableLockContainerImpl(obj ? obj->tableName : "") {}
std::string tableName
TableLockContainerImpl(const std::string &table_name)
Definition: LockMgr.h:89

Member Function Documentation

static auto lockmgr::TableSchemaLockContainer< WriteLock >::acquireTableDescriptor ( const Catalog_Namespace::Catalog cat,
const std::string &  table_name,
const bool  populate_fragmenter = true 
)
inlinestatic

Definition at line 142 of file LockMgr.h.

References Catalog_Namespace::Catalog::getMetadataForTable(), lockmgr::TableLockMgrImpl< TableSchemaLockMgr >::getWriteLockForTable(), and VLOG.

144  {
145  VLOG(1) << "Acquiring Table Schema Write Lock for table: " << table_name;
146  return TableSchemaLockContainer<WriteLock>(
147  cat.getMetadataForTable(table_name, populate_fragmenter),
149  }
static WriteLock getWriteLockForTable(const Catalog_Namespace::Catalog &cat, const std::string &table_name)
Definition: LockMgrImpl.h:155
const TableDescriptor * getMetadataForTable(const std::string &tableName, const bool populateFragmenter=true) const
Returns a pointer to a const TableDescriptor struct matching the provided tableName.
#define VLOG(n)
Definition: Logger.h:291

+ Here is the call graph for this function:

static auto lockmgr::TableSchemaLockContainer< WriteLock >::acquireTableDescriptor ( const Catalog_Namespace::Catalog cat,
const int  table_id 
)
inlinestatic

Definition at line 151 of file LockMgr.h.

References Catalog_Namespace::Catalog::getMetadataForTable(), lockmgr::TableLockMgrImpl< TableSchemaLockMgr >::getWriteLockForTable(), to_string(), and VLOG.

152  {
153  const auto td = cat.getMetadataForTable(table_id);
154  if (!td) {
155  throw std::runtime_error("Table/View ID " + std::to_string(table_id) +
156  " does not exist.");
157  }
158  VLOG(1) << "Acquiring Table Schema Write Lock for table: " << td->tableName;
159  return TableSchemaLockContainer<WriteLock>(
160  td, TableSchemaLockMgr::getWriteLockForTable(cat, td->tableName));
161  }
static WriteLock getWriteLockForTable(const Catalog_Namespace::Catalog &cat, const std::string &table_name)
Definition: LockMgrImpl.h:155
std::string to_string(char const *&&v)
const TableDescriptor * getMetadataForTable(const std::string &tableName, const bool populateFragmenter=true) const
Returns a pointer to a const TableDescriptor struct matching the provided tableName.
#define VLOG(n)
Definition: Logger.h:291

+ Here is the call graph for this function:


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