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::Ranger::Columns Class Referencefinal

#include <swcdb/ranger/db/Columns.h>

+ Inheritance diagram for SWC::Ranger::Columns:
+ Collaboration diagram for SWC::Ranger::Columns:

Public Types

typedef ColumnsPtr
 

Public Member Functions

SWC_CAN_INLINE Columns () noexcept
 
 ~Columns () noexcept
 
ColumnPtr get_column (const cid_t cid)
 
RangePtr get_range (int &err, const cid_t cid, const rid_t rid)
 
ColumnPtr get_next (cid_t &last_cid, size_t &idx)
 
void get_cids (cids_t &cids)
 
void get_columns (Core::Vector< ColumnPtr > &columns)
 
void load_range (const DB::SchemaPrimitives &schema, const Callback::RangeLoad::Ptr &req)
 
bool unload (cid_t cid_begin, cid_t cid_end, Callback::ColumnsUnload::Ptr req)
 
void unload_all (bool validation)
 
void erase_if_empty (cid_t cid)
 
void internal_delete (cid_t cid)
 
size_t release (size_t bytes=0)
 
void print (std::ostream &out, bool minimal=true)
 

Private Attributes

Core::MutexSptd m_mutex
 
Core::StateRunning m_release
 

Detailed Description

Definition at line 34 of file Columns.h.

Member Typedef Documentation

◆ Ptr

Definition at line 37 of file Columns.h.

Constructor & Destructor Documentation

◆ Columns()

SWC_CAN_INLINE SWC::Ranger::Columns::Columns ( )
inlinenoexcept

Definition at line 40 of file Columns.h.

◆ ~Columns()

SWC::Ranger::Columns::~Columns ( )
inlinenoexcept

Definition at line 42 of file Columns.h.

Member Function Documentation

◆ erase_if_empty()

void SWC::Ranger::Columns::erase_if_empty ( cid_t  cid)

Definition at line 159 of file Columns.cc.

References m_mutex.

Referenced by SWC::Ranger::Callback::RangeLoad::loaded(), SWC::Ranger::Column::unload(), and SWC::Ranger::Column::unload_all().

+ Here is the caller graph for this function:

◆ get_cids()

void SWC::Ranger::Columns::get_cids ( cids_t cids)

Definition at line 55 of file Columns.cc.

References m_mutex, SWC::Core::Vector< T, SizeT, GROW_SZ >::push_back(), SWC::Core::Vector< T, SizeT, GROW_SZ >::reserve(), and size.

Referenced by SWC::Comm::Protocol::Rgr::Handler::Report::operator()().

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

◆ get_column()

SWC_CAN_INLINE ColumnPtr SWC::Ranger::Columns::get_column ( const cid_t  cid)

◆ get_columns()

void SWC::Ranger::Columns::get_columns ( Core::Vector< ColumnPtr > &  columns)

Definition at line 62 of file Columns.cc.

References m_mutex, SWC::Core::Vector< T, SizeT, GROW_SZ >::push_back(), SWC::Core::Vector< T, SizeT, GROW_SZ >::reserve(), and size.

Referenced by SWC::Comm::Protocol::Rgr::Handler::Report::operator()().

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

◆ get_next()

ColumnPtr SWC::Ranger::Columns::get_next ( cid_t last_cid,
size_t &  idx 
)

Definition at line 30 of file Columns.cc.

References m_mutex, and size.

Referenced by SWC::Ranger::Compaction::run().

+ Here is the caller graph for this function:

◆ get_range()

SWC_CAN_INLINE RangePtr SWC::Ranger::Columns::get_range ( int &  err,
const cid_t  cid,
const rid_t  rid 
)

Definition at line 21 of file Columns.cc.

References SWC::Error::COLUMN_MARKED_REMOVED, and get_column().

Referenced by SWC::Ranger::Callback::RangeLoad::loaded(), SWC::Comm::Protocol::Rgr::Handler::RangeLocate::operator()(), SWC::Comm::Protocol::Rgr::Handler::RangeQuerySelect::operator()(), SWC::Comm::Protocol::Rgr::Handler::range_is_loaded(), and SWC::Comm::Protocol::Rgr::Handler::range_query_update().

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

◆ internal_delete()

void SWC::Ranger::Columns::internal_delete ( cid_t  cid)

Definition at line 167 of file Columns.cc.

References m_mutex.

Referenced by SWC::Ranger::Callback::ColumnDelete::complete().

+ Here is the caller graph for this function:

◆ load_range()

void SWC::Ranger::Columns::load_range ( const DB::SchemaPrimitives schema,
const Callback::RangeLoad::Ptr req 
)

Definition at line 69 of file Columns.cc.

References SWC::Error::COLUMN_MARKED_REMOVED, SWC::DB::Types::SystemColumn::is_data(), SWC::Env::Rgr::is_not_accepting(), SWC::Env::Rgr::is_shuttingdown(), SWC::LOG_WARN, m_mutex, SWC::Error::OK, SWC::Error::SERVER_SHUTTING_DOWN, SWC_FMT_LU, and SWC_LOGF.

Referenced by SWC::Comm::Protocol::Rgr::Handler::RangeLoad::operator()().

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

◆ print()

void SWC::Ranger::Columns::print ( std::ostream &  out,
bool  minimal = true 
)

Definition at line 221 of file Columns.cc.

References m_mutex.

◆ release()

size_t SWC::Ranger::Columns::release ( size_t  bytes = 0)

Definition at line 174 of file Columns.cc.

References SWC::DB::Types::SystemColumn::is_data(), SWC::LOG_DEBUG, m_mutex, m_release, SWC::Core::StateRunning::running(), SWC::Core::StateRunning::stop(), SWC_FMT_LU, and SWC_LOGF.

Referenced by SWC::Env::Rgr::Rgr().

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

◆ unload()

bool SWC::Ranger::Columns::unload ( cid_t  cid_begin,
cid_t  cid_end,
Callback::ColumnsUnload::Ptr  req 
)

Definition at line 110 of file Columns.cc.

References SWC::System::Resources::concurrency(), m_mutex, and SWC::Env::Rgr::res().

Referenced by SWC::Comm::Protocol::Rgr::Handler::columns_unload(), SWC::Ranger::Callback::ColumnsUnload::complete(), and unload_all().

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

◆ unload_all()

void SWC::Ranger::Columns::unload_all ( bool  validation)

Definition at line 130 of file Columns.cc.

References SWC::DB::Types::SystemColumn::CID_META_BEGIN, SWC::DB::Types::SystemColumn::SYS_CID_END, SWC::DB::Types::SystemColumn::SYS_RGR_DATA, and unload().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_mutex

Core::MutexSptd SWC::Ranger::Columns::m_mutex
private

◆ m_release

Core::StateRunning SWC::Ranger::Columns::m_release
private

Definition at line 73 of file Columns.h.

Referenced by release().


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