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::Env::Rgr Class Referencefinal

#include <swcdb/ranger/RangerEnv.h>

+ Collaboration diagram for SWC::Env::Rgr:

Public Member Functions

 Rgr ()
 
 Rgr (const Rgr &)=delete
 
 Rgr (Rgr &&)=delete
 
Rgroperator= (const Rgr &)=delete
 
Rgroperator= (Rgr &&)=delete
 
 ~Rgr () noexcept
 

Static Public Member Functions

static void init ()
 
static void start ()
 
static void shuttingdown ()
 
static void wait_if_in_process ()
 
static SWC_CAN_INLINE DB::RgrDatargr_data () noexcept
 
static SWC_CAN_INLINE bool is_not_accepting () noexcept
 
static SWC_CAN_INLINE bool is_shuttingdown () noexcept
 
static SWC_CAN_INLINE int64_t in_process () noexcept
 
static SWC_CAN_INLINE void in_process (int64_t count) noexcept
 
static SWC_CAN_INLINE int64_t in_process_ranges () noexcept
 
static SWC_CAN_INLINE void in_process_ranges (int64_t count) noexcept
 
static SWC_CAN_INLINE size_t scan_reserved_bytes () noexcept
 
static SWC_CAN_INLINE void scan_reserved_bytes_add (uint32_t bytes) noexcept
 
static SWC_CAN_INLINE void scan_reserved_bytes_sub (uint32_t bytes) noexcept
 
static SWC_CAN_INLINE Rgrget () noexcept
 
static SWC_CAN_INLINE Comm::IoContextPtr maintenance_io () noexcept
 
static SWC_CAN_INLINE Comm::IoContextPtr io () noexcept
 
template<typename T_Handler >
static SWC_CAN_INLINE void post (T_Handler &&handler)
 
template<typename T_Handler >
static SWC_CAN_INLINE void maintenance_post (T_Handler &&handler)
 
template<typename T_Handler >
static SWC_CAN_INLINE void block_loader_post (T_Handler &&handler)
 
static SWC_CAN_INLINE System::Resourcesres () noexcept
 
static bool log_compact_possible () noexcept
 
static void log_compact_finished () noexcept
 
static bool compaction_available () noexcept
 
static void compaction_schedule (uint32_t ms)
 
static SWC_CAN_INLINE Ranger::Columnscolumns () noexcept
 
static SWC_CAN_INLINE client::Query::Update::Handlers::Commonupdater () noexcept
 
static SWC_CAN_INLINE Ranger::Metric::Reporting::Ptrmetrics_track () noexcept
 
static void reset () noexcept
 

Public Attributes

const SWC::Config::Property::Value_uint8_g::Ptr cfg_req_add_concurrency
 
const SWC::Config::Property::Value_uint8_g::Ptr cfg_cs_max
 
const SWC::Config::Property::Value_int32_g::Ptr cfg_cs_sz
 
const SWC::Config::Property::Value_uint8_g::Ptr cfg_log_rollout_ratio
 
const SWC::Config::Property::Value_uint8_g::Ptr cfg_log_compact_cointervaling
 
const SWC::Config::Property::Value_uint8_g::Ptr cfg_log_fragment_preload
 
const SWC::Config::Property::Value_uint8_g::Ptr cfg_compact_percent
 
const SWC::Config::Property::Value_uint8_g::Ptr cfg_cs_replication
 
const SWC::Config::Property::Value_int32_g::Ptr cfg_blk_size
 
const SWC::Config::Property::Value_int32_g::Ptr cfg_blk_cells
 
const SWC::Config::Property::Value_enum_g::Ptr cfg_blk_enc
 
Comm::IoContextPtr app_io
 
Comm::IoContextPtr loader_io
 
Comm::IoContextPtr mnt_io
 
Ranger::Compaction_compaction
 
Ranger::Columns_columns
 
client::Query::Update::Handlers::Common::Ptr _update_hdlr
 
Ranger::Metric::Reporting::Ptr _reporting
 
System::Resources _resources
 

Private Attributes

DB::RgrData m_rgr_data
 
Core::AtomicBool m_shuttingdown
 
Core::AtomicBool m_not_accepting
 
Core::Atomic< int64_t > m_in_process
 
Core::Atomic< int64_t > m_in_process_ranges
 
Core::Atomic< size_t > m_scan_reserved_bytes
 

Static Private Attributes

static std::shared_ptr< Rgrm_env = nullptr
 

Detailed Description

Definition at line 33 of file RangerEnv.h.

Constructor & Destructor Documentation

◆ Rgr() [1/3]

SWC::Env::Rgr::Rgr ( )
explicit

Definition at line 222 of file RangerEnv.h.

References _columns, and SWC::Ranger::Columns::release().

Referenced by init().

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

◆ Rgr() [2/3]

SWC::Env::Rgr::Rgr ( const Rgr )
delete

◆ Rgr() [3/3]

SWC::Env::Rgr::Rgr ( Rgr &&  )
delete

◆ ~Rgr()

SWC::Env::Rgr::~Rgr ( )
noexcept

Definition at line 324 of file RangerEnv.h.

References _columns, and _compaction.

Member Function Documentation

◆ block_loader_post()

template<typename T_Handler >
static SWC_CAN_INLINE void SWC::Env::Rgr::block_loader_post ( T_Handler &&  handler)
inlinestatic

Definition at line 126 of file RangerEnv.h.

References m_env.

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

+ Here is the caller graph for this function:

◆ columns()

◆ compaction_available()

SWC_CAN_INLINE bool SWC::Env::Rgr::compaction_available ( )
staticnoexcept

Definition at line 380 of file RangerEnv.h.

References m_env.

◆ compaction_schedule()

SWC_CAN_INLINE void SWC::Env::Rgr::compaction_schedule ( uint32_t  ms)
static

Definition at line 385 of file RangerEnv.h.

References m_env.

Referenced by SWC::Ranger::Column::compact(), SWC::Ranger::Column::schema_update(), and SWC::Ranger::CommitLog::Fragments::try_compact().

+ Here is the caller graph for this function:

◆ get()

◆ in_process() [1/2]

static SWC_CAN_INLINE int64_t SWC::Env::Rgr::in_process ( )
inlinestaticnoexcept

Definition at line 63 of file RangerEnv.h.

References m_env.

Referenced by SWC::Ranger::Column::Column(), SWC::Ranger::Callback::ManageBase::ManageBase(), wait_if_in_process(), SWC::Ranger::Column::~Column(), and SWC::Ranger::Callback::ManageBase::~ManageBase().

+ Here is the caller graph for this function:

◆ in_process() [2/2]

static SWC_CAN_INLINE void SWC::Env::Rgr::in_process ( int64_t  count)
inlinestaticnoexcept

Definition at line 68 of file RangerEnv.h.

References m_env.

◆ in_process_ranges() [1/2]

static SWC_CAN_INLINE int64_t SWC::Env::Rgr::in_process_ranges ( )
inlinestaticnoexcept

Definition at line 73 of file RangerEnv.h.

References m_env.

Referenced by SWC::Comm::Protocol::Rgr::Handler::Report::operator()(), SWC::Ranger::Range::Range(), wait_if_in_process(), and SWC::Ranger::Range::~Range().

+ Here is the caller graph for this function:

◆ in_process_ranges() [2/2]

static SWC_CAN_INLINE void SWC::Env::Rgr::in_process_ranges ( int64_t  count)
inlinestaticnoexcept

Definition at line 78 of file RangerEnv.h.

References m_env.

◆ init()

static void SWC::Env::Rgr::init ( )
inlinestatic

Definition at line 36 of file RangerEnv.h.

References m_env, Rgr(), and SWC_ASSERT.

Referenced by SWC::Ranger::AppContext::make().

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

◆ io()

static SWC_CAN_INLINE Comm::IoContextPtr SWC::Env::Rgr::io ( )
inlinestaticnoexcept

Definition at line 108 of file RangerEnv.h.

References m_env.

Referenced by SWC::Ranger::AppContext::init(), SWC::Ranger::AppContext::make(), SWC::Ranger::AppContext::shutting_down(), and SWC::Ranger::AppContext::stop().

+ Here is the caller graph for this function:

◆ is_not_accepting()

◆ is_shuttingdown()

static SWC_CAN_INLINE bool SWC::Env::Rgr::is_shuttingdown ( )
inlinestaticnoexcept

◆ log_compact_finished()

SWC_CAN_INLINE void SWC::Env::Rgr::log_compact_finished ( )
staticnoexcept

Definition at line 375 of file RangerEnv.h.

References m_env.

Referenced by SWC::Ranger::CommitLog::Fragments::finish_compact(), and SWC::Ranger::CommitLog::Fragments::try_compact().

+ Here is the caller graph for this function:

◆ log_compact_possible()

SWC_CAN_INLINE bool SWC::Env::Rgr::log_compact_possible ( )
staticnoexcept

Definition at line 370 of file RangerEnv.h.

References m_env.

Referenced by SWC::Ranger::CommitLog::Fragments::try_compact().

+ Here is the caller graph for this function:

◆ maintenance_io()

static SWC_CAN_INLINE Comm::IoContextPtr SWC::Env::Rgr::maintenance_io ( )
inlinestaticnoexcept

Definition at line 103 of file RangerEnv.h.

References m_env.

◆ maintenance_post()

template<typename T_Handler >
static SWC_CAN_INLINE void SWC::Env::Rgr::maintenance_post ( T_Handler &&  handler)
inlinestatic

Definition at line 120 of file RangerEnv.h.

References m_env.

Referenced by SWC::Ranger::CompactRange::apply_new(), SWC::Ranger::Compaction::compact(), SWC::Ranger::CompactRange::process_encode(), SWC::Ranger::CompactRange::process_interval(), SWC::Ranger::CompactRange::request_more(), SWC::Ranger::CompactRange::response(), SWC::Ranger::Compaction::schedule(), and SWC::Ranger::CompactRange::split().

+ Here is the caller graph for this function:

◆ metrics_track()

static SWC_CAN_INLINE Ranger::Metric::Reporting::Ptr& SWC::Env::Rgr::metrics_track ( )
inlinestaticnoexcept

Definition at line 154 of file RangerEnv.h.

References m_env.

◆ operator=() [1/2]

Rgr& SWC::Env::Rgr::operator= ( const Rgr )
delete

◆ operator=() [2/2]

Rgr& SWC::Env::Rgr::operator= ( Rgr &&  )
delete

◆ post()

◆ res()

static SWC_CAN_INLINE System::Resources& SWC::Env::Rgr::res ( )
inlinestaticnoexcept

Definition at line 131 of file RangerEnv.h.

References m_env.

Referenced by SWC::Ranger::CommitLog::Fragments::_commit(), SWC::Ranger::CommitLog::Compact::Group::_loaded(), SWC::Ranger::CommitLog::Fragments::_need_roll(), SWC::Ranger::Blocks::_split(), SWC::Ranger::Block::_split(), SWC::Ranger::Compaction::available(), SWC::Ranger::Block::Block(), SWC::Ranger::CommitLog::Fragments::commit(), SWC::Ranger::Compaction::compact(), SWC::Ranger::CommitLog::Compact::Compact(), SWC::Ranger::Compaction::compacted(), SWC::Ranger::CommitLog::Fragment::Fragment(), SWC::Ranger::CellStore::Block::Read::load(), SWC::Ranger::CommitLog::Fragment::load(), SWC::Ranger::Block::load_cells(), SWC::Ranger::CellStore::Block::Read::load_cells(), SWC::Ranger::CommitLog::Fragment::load_cells(), SWC::Ranger::Block::load_final(), SWC::Ranger::CellStore::Block::Read::load_finish(), SWC::Ranger::CommitLog::Fragment::load_finish(), SWC::Ranger::CommitLog::Fragment::mark_removed(), SWC::Comm::Protocol::Rgr::Handler::RangeQuerySelect::operator()(), SWC::Comm::Protocol::Rgr::Handler::Report::operator()(), SWC::Ranger::Block::preload(), SWC::Ranger::Callback::RangeQueryUpdate::RangeQueryUpdate(), SWC::Ranger::CellStore::Block::Read::release(), SWC::Ranger::CommitLog::Fragment::release(), SWC::Ranger::Block::release(), SWC::Ranger::CompactRange::request_more(), SWC::Ranger::Blocks::scan(), SWC::Ranger::CommitLog::Fragments::try_compact(), SWC::Ranger::Columns::unload(), SWC::Ranger::CommitLog::Fragment::write(), SWC::Ranger::Block::~Block(), SWC::Ranger::CommitLog::Fragment::~Fragment(), SWC::Ranger::CommitLog::Fragments::~Fragments(), SWC::Ranger::Callback::RangeQueryUpdate::~RangeQueryUpdate(), and SWC::Ranger::CellStore::Block::Read::~Read().

+ Here is the caller graph for this function:

◆ reset()

static void SWC::Env::Rgr::reset ( )
inlinestaticnoexcept

Definition at line 158 of file RangerEnv.h.

References m_env.

Referenced by SWC::Ranger::AppContext::stop().

+ Here is the caller graph for this function:

◆ rgr_data()

◆ scan_reserved_bytes()

static SWC_CAN_INLINE size_t SWC::Env::Rgr::scan_reserved_bytes ( )
inlinestaticnoexcept

Definition at line 83 of file RangerEnv.h.

References m_env.

Referenced by SWC::Ranger::Blocks::_split(), SWC::Comm::Protocol::Rgr::Handler::RangeQuerySelect::operator()(), and SWC::Ranger::Blocks::scan().

+ Here is the caller graph for this function:

◆ scan_reserved_bytes_add()

static SWC_CAN_INLINE void SWC::Env::Rgr::scan_reserved_bytes_add ( uint32_t  bytes)
inlinestaticnoexcept

Definition at line 88 of file RangerEnv.h.

References m_env.

Referenced by SWC::Ranger::ReqScan::ReqScan().

+ Here is the caller graph for this function:

◆ scan_reserved_bytes_sub()

static SWC_CAN_INLINE void SWC::Env::Rgr::scan_reserved_bytes_sub ( uint32_t  bytes)
inlinestaticnoexcept

Definition at line 93 of file RangerEnv.h.

References m_env.

Referenced by SWC::Ranger::ReqScan::~ReqScan().

+ Here is the caller graph for this function:

◆ shuttingdown()

void SWC::Env::Rgr::shuttingdown ( )
static

Definition at line 334 of file RangerEnv.h.

References m_env, and wait_if_in_process().

Referenced by SWC::Ranger::AppContext::shutting_down().

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

◆ start()

void SWC::Env::Rgr::start ( )
static

Definition at line 329 of file RangerEnv.h.

References m_env.

Referenced by SWC::Ranger::AppContext::init().

+ Here is the caller graph for this function:

◆ updater()

static SWC_CAN_INLINE client::Query::Update::Handlers::Common* SWC::Env::Rgr::updater ( )
inlinestaticnoexcept

Definition at line 149 of file RangerEnv.h.

References m_env.

◆ wait_if_in_process()

void SWC::Env::Rgr::wait_if_in_process ( )
static

Definition at line 357 of file RangerEnv.h.

References in_process(), in_process_ranges(), SWC::LOG_WARN, m_env, SWC_FMT_LD, SWC_FMT_LU, and SWC_LOGF.

Referenced by shuttingdown(), and SWC::Ranger::AppContext::stop().

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

Member Data Documentation

◆ _columns

Ranger::Columns* SWC::Env::Rgr::_columns

Definition at line 183 of file RangerEnv.h.

Referenced by Rgr(), and ~Rgr().

◆ _compaction

Ranger::Compaction* SWC::Env::Rgr::_compaction

Definition at line 182 of file RangerEnv.h.

Referenced by ~Rgr().

◆ _reporting

Ranger::Metric::Reporting::Ptr SWC::Env::Rgr::_reporting

Definition at line 185 of file RangerEnv.h.

◆ _resources

System::Resources SWC::Env::Rgr::_resources

Definition at line 186 of file RangerEnv.h.

◆ _update_hdlr

client::Query::Update::Handlers::Common::Ptr SWC::Env::Rgr::_update_hdlr

Definition at line 184 of file RangerEnv.h.

◆ app_io

Comm::IoContextPtr SWC::Env::Rgr::app_io

Definition at line 178 of file RangerEnv.h.

◆ cfg_blk_cells

const SWC::Config::Property::Value_int32_g::Ptr SWC::Env::Rgr::cfg_blk_cells

Definition at line 175 of file RangerEnv.h.

Referenced by SWC::Ranger::ColumnCfg::block_cells().

◆ cfg_blk_enc

const SWC::Config::Property::Value_enum_g::Ptr SWC::Env::Rgr::cfg_blk_enc

Definition at line 176 of file RangerEnv.h.

◆ cfg_blk_size

const SWC::Config::Property::Value_int32_g::Ptr SWC::Env::Rgr::cfg_blk_size

Definition at line 174 of file RangerEnv.h.

Referenced by SWC::Ranger::ColumnCfg::block_size().

◆ cfg_compact_percent

const SWC::Config::Property::Value_uint8_g::Ptr SWC::Env::Rgr::cfg_compact_percent

Definition at line 171 of file RangerEnv.h.

Referenced by SWC::Ranger::ColumnCfg::compact_percent().

◆ cfg_cs_max

const SWC::Config::Property::Value_uint8_g::Ptr SWC::Env::Rgr::cfg_cs_max

Definition at line 164 of file RangerEnv.h.

Referenced by SWC::Ranger::ColumnCfg::cellstore_max().

◆ cfg_cs_replication

const SWC::Config::Property::Value_uint8_g::Ptr SWC::Env::Rgr::cfg_cs_replication

Definition at line 172 of file RangerEnv.h.

Referenced by SWC::Ranger::ColumnCfg::file_replication().

◆ cfg_cs_sz

const SWC::Config::Property::Value_int32_g::Ptr SWC::Env::Rgr::cfg_cs_sz

Definition at line 165 of file RangerEnv.h.

Referenced by SWC::Ranger::ColumnCfg::cellstore_size().

◆ cfg_log_compact_cointervaling

const SWC::Config::Property::Value_uint8_g::Ptr SWC::Env::Rgr::cfg_log_compact_cointervaling

Definition at line 168 of file RangerEnv.h.

Referenced by SWC::Ranger::ColumnCfg::log_compact_cointervaling().

◆ cfg_log_fragment_preload

const SWC::Config::Property::Value_uint8_g::Ptr SWC::Env::Rgr::cfg_log_fragment_preload

Definition at line 169 of file RangerEnv.h.

Referenced by SWC::Ranger::ColumnCfg::log_fragment_preload().

◆ cfg_log_rollout_ratio

const SWC::Config::Property::Value_uint8_g::Ptr SWC::Env::Rgr::cfg_log_rollout_ratio

Definition at line 167 of file RangerEnv.h.

Referenced by SWC::Ranger::ColumnCfg::log_rollout_ratio().

◆ cfg_req_add_concurrency

const SWC::Config::Property::Value_uint8_g::Ptr SWC::Env::Rgr::cfg_req_add_concurrency

Definition at line 162 of file RangerEnv.h.

Referenced by SWC::Ranger::Range::run_add_queue().

◆ loader_io

Comm::IoContextPtr SWC::Env::Rgr::loader_io

Definition at line 179 of file RangerEnv.h.

◆ m_env

◆ m_in_process

Core::Atomic<int64_t> SWC::Env::Rgr::m_in_process
private

Definition at line 203 of file RangerEnv.h.

◆ m_in_process_ranges

Core::Atomic<int64_t> SWC::Env::Rgr::m_in_process_ranges
private

Definition at line 204 of file RangerEnv.h.

◆ m_not_accepting

Core::AtomicBool SWC::Env::Rgr::m_not_accepting
private

Definition at line 202 of file RangerEnv.h.

◆ m_rgr_data

DB::RgrData SWC::Env::Rgr::m_rgr_data
private

Definition at line 200 of file RangerEnv.h.

◆ m_scan_reserved_bytes

Core::Atomic<size_t> SWC::Env::Rgr::m_scan_reserved_bytes
private

Definition at line 205 of file RangerEnv.h.

◆ m_shuttingdown

Core::AtomicBool SWC::Env::Rgr::m_shuttingdown
private

Definition at line 201 of file RangerEnv.h.

◆ mnt_io

Comm::IoContextPtr SWC::Env::Rgr::mnt_io

Definition at line 180 of file RangerEnv.h.


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