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::Core Namespace Reference

The SWC-DB Core Components C++ namespace 'SWC::Core'. More...

Namespaces

 Encoder
 The SWC-DB Encoder C++ namespace 'SWC::Core::Encoder'.
 
 Mem
 

Classes

class  Array
 
class  ArraysArray
 
class  ArraysArraysVector
 
struct  Atomic
 
struct  AtomicBase
 
struct  BitFieldInt
 
struct  Buffer
 
struct  BufferDyn
 
class  BufferStreamIn
 
class  BufferStreamIn_ZSTD
 
class  BufferStreamOut
 
class  BufferStreamOut_ENCODER
 
class  BufferStreamOut_ZSTD
 
class  BufferStreamOut_ZSTD_OnAdd
 
struct  CompletionCounter
 
class  LogWriter
 
class  MutexAtomic
 
class  MutexSptd
 
class  NotMovableSharedPtr
 
class  QueuePointer
 
class  QueueSafe
 
class  QueueSafeStated
 
struct  ScopedLock
 
class  Semaphore
 
struct  SharedLock
 
struct  StateRunning
 
class  StateSynchronization
 
struct  UniqueLock
 
class  Vector
 
class  VectorsVector
 

Typedefs

typedef AtomicBase< bool > AtomicBool
 
typedef BitFieldInt< int32_t, 24 > int24_t
 
typedef BitFieldInt< uint64_t, 40 > uint40_t
 
typedef BitFieldInt< int64_t, 40 > int40_t
 
typedef BitFieldInt< uint64_t, 48 > uint48_t
 
typedef BitFieldInt< int64_t, 48 > int48_t
 
typedef BitFieldInt< uint64_t, 56 > uint56_t
 
typedef BitFieldInt< int64_t, 56 > int56_t
 
typedef Buffer< uint8_t > StaticBuffer
 
typedef BufferDyn< StaticBufferDynamicBuffer
 

Functions

template<typename T , std::memory_order OrderT = std::memory_order_relaxed>
SWC_CAN_INLINE std::ostream & operator<< (std::ostream &out, const AtomicBase< T, OrderT > &v)
 
template<class T , uint8_t SZ>
struct SWC::Core::BitFieldInt __attribute__ ((packed))
 
template<typename T , uint8_t SZ>
SWC_CAN_INLINE std::ostream & operator<< (std::ostream &out, const BitFieldInt< T, SZ > &v)
 
template<class T , uint8_t SZ>
SWC_CAN_INLINE std::string to_string (const BitFieldInt< T, SZ > &v)
 
 SWC_BITFIELD_op_T (+) SWC_BITFIELD_op_T(-) SWC_BITFIELD_op_T(/) SWC_BITFIELD_op_T(*) SWC_BITFIELD_op_T(<<) SWC_BITFIELD_op_T(>>) SWC_BITFIELD_op_T(&) SWC_BITFIELD_op_T(|) SWC_BITFIELD_op_T(^) SWC_T_op_BITFIELD(+) SWC_T_op_BITFIELD(-) SWC_T_op_BITFIELD(/) SWC_T_op_BITFIELD(*) SWC_T_op_BITFIELD(<<) SWC_T_op_BITFIELD(>>) SWC_T_op_BITFIELD(&) SWC_T_op_BITFIELD(|) SWC_T_op_BITFIELD(^) SWC_BITFIELD1_op_BITFIELD2(+) SWC_BITFIELD1_op_BITFIELD2(-) SWC_BITFIELD1_op_BITFIELD2(/) SWC_BITFIELD1_op_BITFIELD2(*) SWC_BITFIELD1_op_BITFIELD2(<<) SWC_BITFIELD1_op_BITFIELD2(>>) SWC_BITFIELD1_op_BITFIELD2(&) SWC_BITFIELD1_op_BITFIELD2(|) SWC_BITFIELD1_op_BITFIELD2(^) SWC_T_vs_BITFIELD(
 
static uint32_t fletcher32 (const uint8_t *data, size_t len) noexcept SWC_ATTRIBS((SWC_ATTRIB_O3))
 
uint32_t checksum32 (const uint8_t *data8, size_t len8) noexcept SWC_ATTRIBS((SWC_ATTRIB_O3))
 
SWC_CAN_INLINE void checksum_i32 (const uint8_t *start, size_t len, uint8_t **ptr) noexcept
 
SWC_CAN_INLINE void checksum_i32 (const uint8_t *start, const uint8_t *end, uint8_t **ptr) noexcept
 
SWC_CAN_INLINE void checksum_i32 (const uint8_t *start, size_t len, uint8_t **ptr, uint32_t &checksum) noexcept
 
SWC_CAN_INLINE void checksum_i32 (const uint8_t *start, const uint8_t *end, uint8_t **ptr, uint32_t &checksum) noexcept
 
bool checksum_i32_log_chk (uint32_t checksum, const uint8_t *base, uint32_t len)
 
SWC_CAN_INLINE bool checksum_i32_chk (uint32_t checksum, const uint8_t *base, uint32_t len)
 
SWC_CAN_INLINE bool checksum_i32_chk (uint32_t checksum, const uint8_t *base, uint32_t len, uint32_t *computed)
 
SWC_CAN_INLINE bool checksum_i32_chk (uint32_t checksum, const uint8_t *base, uint32_t len, uint32_t offset)
 
template<typename T >
SWC_CAN_INLINE const char * type_name (const T &obj) noexcept
 

Variables

 uint24_t
 
LogWriter logger
 

Detailed Description

The SWC-DB Core Components C++ namespace 'SWC::Core'.

Typedef Documentation

◆ AtomicBool

Definition at line 63 of file Atomic.h.

◆ DynamicBuffer

Definition at line 299 of file Buffer.h.

◆ int24_t

typedef BitFieldInt<int32_t, 24> SWC::Core::int24_t

Definition at line 380 of file BitFieldInt.h.

◆ int40_t

typedef BitFieldInt<int64_t, 40> SWC::Core::int40_t

Definition at line 383 of file BitFieldInt.h.

◆ int48_t

typedef BitFieldInt<int64_t, 48> SWC::Core::int48_t

Definition at line 386 of file BitFieldInt.h.

◆ int56_t

typedef BitFieldInt<int64_t, 56> SWC::Core::int56_t

Definition at line 389 of file BitFieldInt.h.

◆ StaticBuffer

typedef Buffer<uint8_t> SWC::Core::StaticBuffer

Definition at line 298 of file Buffer.h.

◆ uint40_t

typedef BitFieldInt<uint64_t, 40> SWC::Core::uint40_t

Definition at line 382 of file BitFieldInt.h.

◆ uint48_t

typedef BitFieldInt<uint64_t, 48> SWC::Core::uint48_t

Definition at line 385 of file BitFieldInt.h.

◆ uint56_t

typedef BitFieldInt<uint64_t, 56> SWC::Core::uint56_t

Definition at line 388 of file BitFieldInt.h.

Function Documentation

◆ __attribute__()

template<class T , uint8_t SZ>
struct SWC::Core::BitFieldInt SWC::Core::__attribute__ ( (packed)  )

◆ checksum32()

SWC_CAN_INLINE uint32_t SWC::Core::checksum32 ( const uint8_t *  data8,
size_t  len8 
)
noexcept

Definition at line 55 of file Checksum.h.

References fletcher32().

Referenced by checksum_i32(), checksum_i32_chk(), checksum_i32_log_chk(), and SWC::Comm::BufferInfo::encode().

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

◆ checksum_i32() [1/4]

SWC_CAN_INLINE void SWC::Core::checksum_i32 ( const uint8_t *  start,
const uint8_t *  end,
uint8_t **  ptr 
)
noexcept

Definition at line 68 of file Checksum.h.

References checksum32(), and SWC::Serialization::encode_i32().

+ Here is the call graph for this function:

◆ checksum_i32() [2/4]

SWC_CAN_INLINE void SWC::Core::checksum_i32 ( const uint8_t *  start,
const uint8_t *  end,
uint8_t **  ptr,
uint32_t &  checksum 
)
noexcept

Definition at line 81 of file Checksum.h.

References checksum, checksum32(), and SWC::Serialization::encode_i32().

+ Here is the call graph for this function:

◆ checksum_i32() [3/4]

SWC_CAN_INLINE void SWC::Core::checksum_i32 ( const uint8_t *  start,
size_t  len,
uint8_t **  ptr 
)
noexcept

Definition at line 62 of file Checksum.h.

References checksum32(), and SWC::Serialization::encode_i32().

Referenced by SWC::Ranger::CellStore::Block::Header::encode(), SWC::Comm::Header::encode(), SWC::Common::Files::RgrData::set_rgr(), SWC::Manager::Schemas::store_make_block(), SWC::Ranger::RangeData::write(), SWC::Ranger::CommitLog::Fragment::write(), SWC::Common::Files::Schema::write(), SWC::Ranger::CellStore::Write::write_blocks_index(), and SWC::Ranger::CellStore::Write::write_trailer().

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

◆ checksum_i32() [4/4]

SWC_CAN_INLINE void SWC::Core::checksum_i32 ( const uint8_t *  start,
size_t  len,
uint8_t **  ptr,
uint32_t &  checksum 
)
noexcept

Definition at line 75 of file Checksum.h.

References checksum, checksum32(), and SWC::Serialization::encode_i32().

+ Here is the call graph for this function:

◆ checksum_i32_chk() [1/3]

SWC_CAN_INLINE bool SWC::Core::checksum_i32_chk ( uint32_t  checksum,
const uint8_t *  base,
uint32_t  len 
)

Definition at line 94 of file Checksum.h.

References checksum, and checksum32().

Referenced by checksum_i32_chk(), SWC::Comm::Header::decode(), SWC::Ranger::RangeData::load(), SWC::Common::Files::Schema::load(), SWC::Ranger::CellStore::Read::load_blocks_index(), SWC::Ranger::CellStore::Block::Read::load_header(), SWC::Ranger::CommitLog::Fragment::load_header(), SWC::Ranger::CellStore::Block::Read::load_read(), SWC::Ranger::CommitLog::Fragment::load_read(), SWC::Ranger::CellStore::Read::load_trailer(), SWC::Comm::ConnHandler::Receiver_Buffer::operator()(), SWC::Common::Files::RgrData::read(), and SWC::Manager::Schemas::store_load().

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

◆ checksum_i32_chk() [2/3]

SWC_CAN_INLINE bool SWC::Core::checksum_i32_chk ( uint32_t  checksum,
const uint8_t *  base,
uint32_t  len,
uint32_t *  computed 
)

Definition at line 99 of file Checksum.h.

References checksum, and checksum32().

+ Here is the call graph for this function:

◆ checksum_i32_chk() [3/3]

SWC_CAN_INLINE bool SWC::Core::checksum_i32_chk ( uint32_t  checksum,
const uint8_t *  base,
uint32_t  len,
uint32_t  offset 
)

Definition at line 105 of file Checksum.h.

References checksum, and checksum_i32_chk().

+ Here is the call graph for this function:

◆ checksum_i32_log_chk()

bool SWC::Core::checksum_i32_log_chk ( uint32_t  checksum,
const uint8_t *  base,
uint32_t  len 
)

Definition at line 14 of file Checksum.cc.

References checksum, checksum32(), SWC::LOG_ERROR, and SWC_LOGF.

+ Here is the call graph for this function:

◆ fletcher32()

static SWC_SHOULD_NOT_INLINE uint32_t SWC::Core::fletcher32 ( const uint8_t *  data,
size_t  len 
)
staticnoexcept

Definition at line 26 of file Checksum.h.

References data.

Referenced by checksum32().

+ Here is the caller graph for this function:

◆ operator<<() [1/2]

template<typename T , std::memory_order OrderT = std::memory_order_relaxed>
SWC_CAN_INLINE std::ostream& SWC::Core::operator<< ( std::ostream &  out,
const AtomicBase< T, OrderT > &  v 
)

Definition at line 198 of file Atomic.h.

References SWC::Core::AtomicBase< T, OrderT >::load().

+ Here is the call graph for this function:

◆ operator<<() [2/2]

template<typename T , uint8_t SZ>
SWC_CAN_INLINE std::ostream& SWC::Core::operator<< ( std::ostream &  out,
const BitFieldInt< T, SZ > &  v 
)

Definition at line 256 of file BitFieldInt.h.

References SWC::Core::BitFieldInt< T, SZ >::data.

◆ SWC_BITFIELD_op_T()

SWC::Core::SWC_BITFIELD_op_T ( ) &

◆ to_string()

template<class T , uint8_t SZ>
SWC_CAN_INLINE std::string SWC::Core::to_string ( const BitFieldInt< T, SZ > &  v)

Definition at line 263 of file BitFieldInt.h.

References SWC::Core::BitFieldInt< T, SZ >::data.

Referenced by SWC::Core::LogWriter::_renew_files(), SWC::client::Query::Update::Handlers::Metric::Reporting::apply_time(), SWC::Ranger::Query::Select::CheckMeta::CheckMeta(), SWC::Ranger::Compaction::compact(), SWC::Common::Query::Update::Metric::Reporting::configure(), SWC::Core::LogWriter::daemon(), SWC::Common::Query::Update::Metric::Item_Net< SWC::Comm::Protocol::FsBroker::Commands >::definitions(), SWC::DB::Schema::display(), SWC::Comm::Protocol::Mngr::Params::Report::RspManagersStatus::Manager::display(), SWC::Comm::endpoints_hash(), SWC::client::SQL::Reader::error_msg(), SWC::Manager::ColumnHealthCheck::finishing(), SWC::Time::fmt_ns(), SWC::Utils::LoadGenerator::generate(), SWC::DB::RangeBase::get_column_path(), SWC::Ranger::CommitLog::Compact::get_filepath(), SWC::Ranger::CommitLog::Fragments::get_log_fragment(), SWC::DB::RangeBase::get_path(), SWC::DB::RangeBase::get_path_cs(), SWC::ThriftBroker::AppHandler::get_schemas(), SWC::Comm::Protocol::Mngr::Req::RgrMngId::handle(), SWC::Config::Settings::init_process(), SWC::FS::FileSystemHadoop::initialize(), SWC::Common::Files::Schema::load(), SWC::client::Query::Update::Committer::locate_on_manager(), SWC::client::Query::Update::Committer::locate_on_ranger(), SWC::Manager::MngrRole::managers_checkin(), SWC::client::Query::Select::Scanner::mngr_locate_master(), SWC::Utils::LoadGenerator::KeyGeneratorUpdate::next(), SWC::Utils::LoadGenerator::KeyGeneratorSelect::next(), SWC::Manager::Ranger::print(), SWC::Utils::shell::Statistics::Stats::print(), SWC::Utils::shell::Statistics::StatsDefinition::print(), SWC::DB::Cells::TSV::FileReader::read(), SWC::Utils::shell::Rgr::read_endpoint(), SWC::Manager::MngdColumns::remove(), SWC::DB::RgrData::remove(), SWC::client::Query::Update::Handlers::Metric::Reporting::report(), SWC::Core::LogWriter::repr(), SWC::client::Query::Select::Scanner::rgr_locate_master(), SWC::client::Query::Select::Scanner::rgr_locate_meta(), SWC::DB::Cells::TSV::FileWriter::roll_file(), SWC::DB::RgrData::BaseSelector::scan(), SWC::Comm::server::SerializedServer::SerializedServer(), SWC::Utils::shell::Statistics::set_definitions(), SWC::DB::RgrData::set_delete_cell(), SWC::DB::RgrData::set_insert_cell(), SWC::Utils::shell::Statistics::show(), SWC::Utils::shell::Statistics::StatsDefinition::StatsDefinition(), SWC::FS::FileSystem::stop(), SWC::ThriftBroker::AppHandler::sync_select(), SWC::Comm::Protocol::Mngr::Params::ColumnCompactReq::to_string(), SWC::Comm::Protocol::Mngr::Params::ColumnCompactRsp::to_string(), SWC::Comm::Protocol::Mngr::Params::RangeCreateReq::to_string(), SWC::Comm::Protocol::Mngr::Params::RangeCreateRsp::to_string(), SWC::Comm::Protocol::Mngr::Params::RangeRemoveReq::to_string(), SWC::Comm::Protocol::Mngr::Params::RangeRemoveRsp::to_string(), SWC::Comm::Protocol::Mngr::Params::RangeUnloadedReq::to_string(), SWC::Comm::Protocol::Mngr::Params::RangeUnloadedRsp::to_string(), SWC::Comm::Protocol::Rgr::Params::ColumnCompactReq::to_string(), SWC::Comm::Protocol::Rgr::Params::ColumnCompactRsp::to_string(), SWC::FS::Dirent::to_string(), SWC::Config::Property::Value_uint8::to_string(), SWC::Config::Property::Value_uint16::to_string(), SWC::Config::Property::Value_int32::to_string(), SWC::Config::Property::Value_int64::to_string(), SWC::Config::Property::Value_uint8_g::to_string(), SWC::Config::Property::Value_uint16_g::to_string(), SWC::Config::Property::Value_int32_g::to_string(), SWC::Config::Property::Value_uint64_g::to_string(), and SWC::DB::Cells::TSV::FileWriter::write().

+ Here is the caller graph for this function:

◆ type_name()

template<typename T >
SWC_CAN_INLINE const char* SWC::Core::type_name ( const T &  obj)
noexcept

Definition at line 204 of file Compat.h.

Referenced by SWC::Comm::Protocol::Mngr::Req::MngrActive::handle_no_conn(), SWC::Comm::client::ConnQueueReqBase::print(), and SWC::Comm::Protocol::Mngr::Req::MngrActive::run().

+ Here is the caller graph for this function:

Variable Documentation

◆ logger

LogWriter SWC::Core::logger

INITIATE SINGLETONE LOGGER INSTANCE.

Definition at line 15 of file Logger.cc.

Referenced by SWC::Config::Settings::init_options(), SWC::Config::Settings::init_process(), and SWC::Error::Exception::print_base().

◆ uint24_t

SWC::Core::uint24_t

Definition at line 379 of file BitFieldInt.h.