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

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

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

Classes

class  AssignGroup
 

Public Types

typedef ColumnsPtr
 

Public Member Functions

 Columns () noexcept
 
 ~Columns () noexcept
 
void reset ()
 
void state (int &err)
 
bool is_an_initialization (int &err, const DB::Schema::Ptr &schema)
 
Column::Ptr get_column (int &err, const cid_t cid)
 
Range::Ptr get_next_unassigned (bool &waiting_meta)
 
void set_rgr_unassigned (rgrid_t rgrid)
 
void change_rgr (rgrid_t rgrid_old, rgrid_t rgrid)
 
void assigned (rgrid_t rgrid, size_t num, Core::Vector< Range::Ptr > &ranges)
 
Column::Ptr get_need_health_check (int64_t ts, uint32_t ms)
 
void remove (const cid_t cid)
 
void assign_add (Range::Ptr &&range)
 
void assign_add (const Range::Ptr &range)
 
void assign_remove (const Range::Ptr &range)
 
void print (std::ostream &out)
 

Static Public Member Functions

static void columns_by_fs (int &err, FS::IdEntries_t &entries)
 

Private Member Functions

AssignGroupassign_group (const cid_t cid) noexcept
 

Private Attributes

AssignGroup m_need_assign [4]
 
Core::MutexSptd m_mutex
 
cid_t m_health_last_cid
 

Detailed Description

Definition at line 24 of file Columns.h.

Member Typedef Documentation

◆ Ptr

Definition at line 33 of file Columns.h.

Constructor & Destructor Documentation

◆ Columns()

SWC::Manager::Columns::Columns ( )
inlinenoexcept

Definition at line 35 of file Columns.h.

◆ ~Columns()

SWC::Manager::Columns::~Columns ( )
inlinenoexcept

Definition at line 37 of file Columns.h.

Member Function Documentation

◆ assign_add() [1/2]

void SWC::Manager::Columns::assign_add ( const Range::Ptr range)
inline

Definition at line 171 of file Columns.h.

References SWC::Manager::Columns::AssignGroup::add(), and assign_group().

+ Here is the call graph for this function:

◆ assign_add() [2/2]

void SWC::Manager::Columns::assign_add ( Range::Ptr &&  range)
inline

Definition at line 167 of file Columns.h.

References SWC::Manager::Columns::AssignGroup::add(), and assign_group().

Referenced by SWC::Manager::Column::init(), and SWC::Manager::Range::set_state_none().

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

◆ assign_group()

AssignGroup& SWC::Manager::Columns::assign_group ( const cid_t  cid)
inlineprivatenoexcept

Definition at line 243 of file Columns.h.

References SWC::DB::Types::SystemColumn::CID_MASTER_END, SWC::DB::Types::SystemColumn::CID_META_END, m_need_assign, and SWC::DB::Types::SystemColumn::SYS_RGR_DATA.

Referenced by assign_add(), assign_remove(), and remove().

+ Here is the caller graph for this function:

◆ assign_remove()

void SWC::Manager::Columns::assign_remove ( const Range::Ptr range)
inline

Definition at line 175 of file Columns.h.

References assign_group(), and SWC::Manager::Columns::AssignGroup::remove().

Referenced by SWC::Manager::Range::set_deleted(), and SWC::Manager::Range::set_state_queued().

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

◆ assigned()

void SWC::Manager::Columns::assigned ( rgrid_t  rgrid,
size_t  num,
Core::Vector< Range::Ptr > &  ranges 
)
inline

Definition at line 123 of file Columns.h.

References m_mutex.

Referenced by SWC::Manager::Rangers::update_status().

+ Here is the caller graph for this function:

◆ change_rgr()

void SWC::Manager::Columns::change_rgr ( rgrid_t  rgrid_old,
rgrid_t  rgrid 
)
inline

Definition at line 117 of file Columns.h.

References m_mutex.

Referenced by SWC::Manager::Rangers::update_status().

+ Here is the caller graph for this function:

◆ columns_by_fs()

static void SWC::Manager::Columns::columns_by_fs ( int &  err,
FS::IdEntries_t entries 
)
inlinestatic

Definition at line 28 of file Columns.h.

References SWC::DB::RangeBase::get_column_path(), and SWC::Env::FsInterface::interface().

Referenced by SWC::Manager::MngdColumns::initialize().

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

◆ get_column()

Column::Ptr SWC::Manager::Columns::get_column ( int &  err,
const cid_t  cid 
)
inline

Definition at line 71 of file Columns.h.

References SWC::Error::COLUMN_NOT_EXISTS, and m_mutex.

Referenced by SWC::Comm::Protocol::Rgr::Req::ColumnsUnload::handle(), SWC::Manager::MngdColumns::remove(), SWC::Manager::MngdColumns::update_status(), and SWC::Manager::Rangers::update_status().

+ Here is the caller graph for this function:

◆ get_need_health_check()

Column::Ptr SWC::Manager::Columns::get_need_health_check ( int64_t  ts,
uint32_t  ms 
)
inline

Definition at line 143 of file Columns.h.

References m_health_last_cid, m_mutex, and SWC::DB::SchemaPrimitives::NO_CID.

Referenced by SWC::Manager::Rangers::health_check_columns().

+ Here is the caller graph for this function:

◆ get_next_unassigned()

Range::Ptr SWC::Manager::Columns::get_next_unassigned ( bool &  waiting_meta)
inline

Definition at line 80 of file Columns.h.

References _PRELOAD, SWC::DB::Types::SystemColumn::CID_MASTER_BEGIN, SWC::DB::Types::SystemColumn::CID_MASTER_END, SWC::DB::Types::SystemColumn::CID_META_BEGIN, SWC::DB::Types::SystemColumn::CID_META_END, SWC::Manager::Columns::AssignGroup::get(), m_need_assign, and SWC::DB::Types::SystemColumn::SYS_RGR_DATA.

+ Here is the call graph for this function:

◆ is_an_initialization()

bool SWC::Manager::Columns::is_an_initialization ( int &  err,
const DB::Schema::Ptr schema 
)
inline

Definition at line 54 of file Columns.h.

References m_mutex, and remove().

Referenced by SWC::Manager::MngdColumns::update_status().

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

◆ print()

void SWC::Manager::Columns::print ( std::ostream &  out)
inline

Definition at line 179 of file Columns.h.

References m_mutex.

Referenced by SWC::Manager::MngdColumns::print().

+ Here is the caller graph for this function:

◆ remove()

void SWC::Manager::Columns::remove ( const cid_t  cid)
inline

Definition at line 156 of file Columns.h.

References assign_group(), m_mutex, and SWC::Manager::Columns::AssignGroup::remove().

Referenced by is_an_initialization(), and SWC::Manager::MngdColumns::remove().

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

◆ reset()

void SWC::Manager::Columns::reset ( )
inline

Definition at line 39 of file Columns.h.

References m_mutex, and m_need_assign.

Referenced by SWC::Manager::MngdColumns::change_active().

+ Here is the caller graph for this function:

◆ set_rgr_unassigned()

void SWC::Manager::Columns::set_rgr_unassigned ( rgrid_t  rgrid)
inline

Definition at line 111 of file Columns.h.

References m_mutex.

Referenced by SWC::Manager::Rangers::next_rgr(), SWC::Manager::Rangers::rgr_report(), SWC::Manager::Rangers::rgr_set(), SWC::Manager::Rangers::rgr_shutdown(), and SWC::Manager::Rangers::update_status().

+ Here is the caller graph for this function:

◆ state()

void SWC::Manager::Columns::state ( int &  err)
inline

Definition at line 48 of file Columns.h.

References m_mutex.

Referenced by SWC::Manager::MngdColumns::columns_ready().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_health_last_cid

cid_t SWC::Manager::Columns::m_health_last_cid
private

Definition at line 257 of file Columns.h.

Referenced by get_need_health_check().

◆ m_mutex

Core::MutexSptd SWC::Manager::Columns::m_mutex
private

◆ m_need_assign

AssignGroup SWC::Manager::Columns::m_need_assign[4]
private

Definition at line 255 of file Columns.h.

Referenced by assign_group(), get_next_unassigned(), and reset().


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