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::BufferDyn< BufferT > Struct Template Reference

#include <swcdb/core/Buffer.h>

+ Inheritance diagram for SWC::Core::BufferDyn< BufferT >:
+ Collaboration diagram for SWC::Core::BufferDyn< BufferT >:

Public Types

using value_type = typename BufferT::value_type
 
typedef std::shared_ptr< BufferDynPtr
 

Public Member Functions

constexpr SWC_CAN_INLINE BufferDyn () noexcept
 
constexpr SWC_CAN_INLINE BufferDyn (size_t sz)
 
constexpr SWC_CAN_INLINE BufferDyn (BufferDyn &&other) noexcept
 
 BufferDyn (const BufferDyn &)=delete
 
BufferDynoperator= (const BufferDyn &)=delete
 
BufferDynoperator= (BufferDyn &&)=delete
 
 ~BufferDyn () noexcept
 
SWC_CAN_INLINE void free ()
 
constexpr value_typerelease (size_t *lenp) noexcept
 
constexpr SWC_CAN_INLINE size_t remaining () const noexcept
 
constexpr SWC_CAN_INLINE size_t fill () const noexcept
 
constexpr SWC_CAN_INLINE bool empty () const noexcept
 
constexpr SWC_CAN_INLINE void set_mark () noexcept
 
constexpr SWC_CAN_INLINE void clear () noexcept
 
SWC_CAN_INLINE void ensure (size_t len)
 
SWC_CAN_INLINE value_typeadd_unchecked (const value_type *data, size_t len) noexcept
 
value_typeadd (const value_type *data, size_t len)
 
SWC_CAN_INLINE value_typeadd (const std::string &data)
 
void add (const value_type data)
 
void set (const value_type *data, size_t len)
 
void take_ownership (BufferDyn< BufferT > &other) noexcept
 
void take_ownership (BufferT &other) noexcept
 

Public Attributes

value_typeptr
 
value_typemark
 

Detailed Description

template<typename BufferT>
struct SWC::Core::BufferDyn< BufferT >

Definition at line 138 of file Buffer.h.

Member Typedef Documentation

◆ Ptr

template<typename BufferT >
typedef std::shared_ptr<BufferDyn> SWC::Core::BufferDyn< BufferT >::Ptr

Definition at line 141 of file Buffer.h.

◆ value_type

template<typename BufferT >
using SWC::Core::BufferDyn< BufferT >::value_type = typename BufferT::value_type

Definition at line 140 of file Buffer.h.

Constructor & Destructor Documentation

◆ BufferDyn() [1/4]

template<typename BufferT >
constexpr SWC_CAN_INLINE SWC::Core::BufferDyn< BufferT >::BufferDyn ( )
inlineexplicitconstexprnoexcept

Definition at line 145 of file Buffer.h.

◆ BufferDyn() [2/4]

template<typename BufferT >
constexpr SWC_CAN_INLINE SWC::Core::BufferDyn< BufferT >::BufferDyn ( size_t  sz)
inlineconstexpr

Definition at line 150 of file Buffer.h.

◆ BufferDyn() [3/4]

template<typename BufferT >
constexpr SWC_CAN_INLINE SWC::Core::BufferDyn< BufferT >::BufferDyn ( BufferDyn< BufferT > &&  other)
inlineconstexprnoexcept

Definition at line 155 of file Buffer.h.

◆ BufferDyn() [4/4]

template<typename BufferT >
SWC::Core::BufferDyn< BufferT >::BufferDyn ( const BufferDyn< BufferT > &  )
delete

◆ ~BufferDyn()

template<typename BufferT >
SWC::Core::BufferDyn< BufferT >::~BufferDyn ( )
inlinenoexcept

Definition at line 168 of file Buffer.h.

Member Function Documentation

◆ add() [1/3]

template<typename BufferT >
SWC_CAN_INLINE value_type* SWC::Core::BufferDyn< BufferT >::add ( const std::string &  data)
inline

Definition at line 255 of file Buffer.h.

◆ add() [2/3]

template<typename BufferT >
value_type* SWC::Core::BufferDyn< BufferT >::add ( const value_type data,
size_t  len 
)
inline

Definition at line 249 of file Buffer.h.

Referenced by SWC::Core::BufferDyn< StaticBuffer >::add(), SWC::Core::BufferStreamOut::add(), SWC::Core::BufferStreamIn::add(), SWC::Core::BufferStreamIn_ZSTD::add(), SWC::Core::BufferStreamIn_ZSTD::get(), SWC::Core::BufferStreamIn::put_back(), and SWC::DB::Cells::TSV::FileWriter::write().

+ Here is the caller graph for this function:

◆ add() [3/3]

template<typename BufferT >
void SWC::Core::BufferDyn< BufferT >::add ( const value_type  data)
inline

Definition at line 260 of file Buffer.h.

◆ add_unchecked()

template<typename BufferT >
SWC_CAN_INLINE value_type* SWC::Core::BufferDyn< BufferT >::add_unchecked ( const value_type data,
size_t  len 
)
inlinenoexcept

Definition at line 240 of file Buffer.h.

Referenced by SWC::Core::BufferDyn< StaticBuffer >::add(), SWC::Core::Encoder::encode(), SWC::Core::BufferDyn< StaticBuffer >::set(), and SWC::DB::Cells::Cell::write().

+ Here is the caller graph for this function:

◆ clear()

template<typename BufferT >
constexpr SWC_CAN_INLINE void SWC::Core::BufferDyn< BufferT >::clear ( )
inlineconstexprnoexcept

Definition at line 207 of file Buffer.h.

Referenced by SWC::Core::BufferStreamIn_ZSTD::add(), SWC::Core::BufferStreamOut_ZSTD::get(), SWC::Core::BufferStreamOut_ENCODER::get(), SWC::Core::BufferStreamIn_ZSTD::get(), SWC::Core::BufferDyn< StaticBuffer >::set(), and SWC::Manager::Schemas::store_create().

+ Here is the caller graph for this function:

◆ empty()

template<typename BufferT >
constexpr SWC_CAN_INLINE bool SWC::Core::BufferDyn< BufferT >::empty ( ) const
inlineconstexprnoexcept

Definition at line 197 of file Buffer.h.

Referenced by SWC::Ranger::Callback::RangeQuerySelect::response().

+ Here is the caller graph for this function:

◆ ensure()

template<typename BufferT >
SWC_CAN_INLINE void SWC::Core::BufferDyn< BufferT >::ensure ( size_t  len)
inline

Definition at line 212 of file Buffer.h.

Referenced by SWC::Core::BufferStreamOut_ZSTD_OnAdd::add(), SWC::Core::BufferDyn< StaticBuffer >::add(), SWC::Common::Query::Update::Metric::Item_Net< SWC::Comm::Protocol::FsBroker::Commands >::definitions(), SWC::Common::Query::Update::Metric::Item_FS::definitions(), SWC::Core::Encoder::encode(), SWC::Ranger::Callback::RangeQuerySelect::ensure_size(), SWC::Core::BufferStreamOut::get(), SWC::Core::BufferStreamOut_ZSTD_OnAdd::get(), SWC::Core::BufferStreamIn_ZSTD::get(), SWC::Ranger::Range::on_change(), SWC::Common::Query::Update::Metric::Item_Net< SWC::Comm::Protocol::FsBroker::Commands >::report(), SWC::Common::Query::Update::Metric::Item_Mem::report(), SWC::Common::Query::Update::Metric::Item_CPU::report(), SWC::Common::Query::Update::Metric::Item_FS::report(), SWC::client::Query::Update::Handlers::Metric::Item_MinMaxAvgCount::report(), SWC::client::Query::Update::Handlers::Metric::Item_CountVolume::report(), SWC::Ranger::Callback::RangeQuerySelect::response(), SWC::Thrift::Converter::set(), SWC::Core::BufferDyn< StaticBuffer >::set(), SWC::Common::Files::RgrData::set_rgr(), SWC::Manager::Schemas::store_create(), SWC::Manager::Schemas::store_make_block(), SWC::Ranger::Callback::RangeQuerySelectUpdating_Serial::update_cell_value(), SWC::Utils::LoadGenerator::update_data(), SWC::DB::Cells::Mutable::write(), SWC::DB::Cells::Result::write(), SWC::DB::Cells::Cell::write(), SWC::Ranger::RangeData::write(), SWC::DB::Cell::Serial::Value::Field_LIST_INT64::write(), SWC::DB::Cell::Serial::Value::Field_LIST_BYTES::write(), SWC::Common::Files::Schema::write(), SWC::DB::Cells::Mutable::write_and_free(), and SWC::DB::Cells::Result::write_and_free().

+ Here is the caller graph for this function:

◆ fill()

template<typename BufferT >
constexpr SWC_CAN_INLINE size_t SWC::Core::BufferDyn< BufferT >::fill ( ) const
inlineconstexprnoexcept

Definition at line 192 of file Buffer.h.

Referenced by SWC::Ranger::CommitLog::Fragments::_commit(), SWC::Core::BufferStreamIn::add(), SWC::Core::BufferStreamIn_ZSTD::add(), SWC::Ranger::Callback::RangeQuerySelect::add_cell_and_more(), SWC::Ranger::CompactRange::add_cell_and_more(), SWC::DB::Cells::Mutable::add_raw(), SWC::Core::BufferStreamOut::available(), SWC::Ranger::CompactRange::InBlock::cell_avg_size(), SWC::client::Query::Update::BrokerCommitter::commit(), SWC::client::Query::Update::Committer::commit_data(), SWC::Common::Query::Update::Metric::Item_Net< SWC::Comm::Protocol::FsBroker::Commands >::definitions(), SWC::Common::Query::Update::Metric::Item_Mem::definitions(), SWC::Common::Query::Update::Metric::Item_CPU::definitions(), SWC::Common::Query::Update::Metric::Item_FS::definitions(), SWC::FsBroker::Metric::Item_Fds::definitions(), SWC::Core::BufferStreamOut::empty(), SWC::Core::BufferStreamIn::empty(), SWC::Core::BufferStreamIn_ZSTD::empty(), SWC::Ranger::CellStore::Block::Write::encode(), SWC::Ranger::Callback::RangeQuerySelect::ensure_size(), SWC::Ranger::CompactRange::InBlock::finalize_interval(), SWC::Core::BufferStreamOut::full(), SWC::Core::BufferStreamIn::get(), SWC::Core::BufferStreamOut_ZSTD::get(), SWC::Core::BufferStreamOut_ENCODER::get(), SWC::Core::BufferStreamIn_ZSTD::get(), SWC::client::Query::Update::Handlers::ColumnMutable::get_buff(), SWC::Comm::Protocol::Bkr::Req::CellsUpdate< DataT >::make(), SWC::Comm::Protocol::Rgr::Req::RangeQueryUpdate< DataT >::make(), SWC::Ranger::CommitLog::Fragment::make_write(), SWC::Ranger::Range::on_change(), SWC::Ranger::CompactRange::reached_limits(), SWC::client::SQL::Reader::read_ts_and_value(), SWC::Core::BufferDyn< StaticBuffer >::release(), SWC::Core::BufferDyn< StaticBuffer >::remaining(), SWC::Common::Query::Update::Metric::Item_Net< SWC::Comm::Protocol::FsBroker::Commands >::report(), SWC::Common::Query::Update::Metric::Item_Mem::report(), SWC::Common::Query::Update::Metric::Item_CPU::report(), SWC::Common::Query::Update::Metric::Item_FS::report(), SWC::client::Query::Update::Handlers::Metric::Item_MinMaxAvgCount::report(), SWC::client::Query::Update::Handlers::Metric::Item_Count::report(), SWC::client::Query::Update::Handlers::Metric::Item_Volume::report(), SWC::client::Query::Update::Handlers::Metric::Item_CountVolume::report(), SWC::Ranger::Callback::RangeQuerySelect::response(), SWC::Thrift::Converter::set(), SWC::ThriftBroker::AppHandler::set(), SWC::DB::Cells::Cell::set_value(), SWC::Manager::Schemas::store_create(), SWC::Manager::Schemas::store_make_block(), SWC::Ranger::Callback::RangeQuerySelectDeleting::update(), SWC::Ranger::Callback::RangeQuerySelectUpdating::update(), SWC::Ranger::Callback::RangeQuerySelectUpdating_Serial::update_cell_value(), SWC::Utils::LoadGenerator::update_data(), SWC::DB::Cells::TSV::FileWriter::write(), SWC::Ranger::CommitLog::Fragment::write(), SWC::DB::Cells::Mutable::write_and_free(), SWC::DB::Cells::MutableVec::write_and_free(), and SWC::DB::Cells::Result::write_and_free().

+ Here is the caller graph for this function:

◆ free()

template<typename BufferT >
SWC_CAN_INLINE void SWC::Core::BufferDyn< BufferT >::free ( )
inline

Definition at line 171 of file Buffer.h.

Referenced by SWC::Core::Encoder::encode(), SWC::Ranger::CompactRange::InBlock::finalize_encode(), and SWC::Ranger::Callback::RangeQuerySelect::response().

+ Here is the caller graph for this function:

◆ operator=() [1/2]

template<typename BufferT >
BufferDyn& SWC::Core::BufferDyn< BufferT >::operator= ( BufferDyn< BufferT > &&  )
delete

◆ operator=() [2/2]

template<typename BufferT >
BufferDyn& SWC::Core::BufferDyn< BufferT >::operator= ( const BufferDyn< BufferT > &  )
delete

◆ release()

template<typename BufferT >
constexpr value_type* SWC::Core::BufferDyn< BufferT >::release ( size_t *  lenp)
inlineconstexprnoexcept

Definition at line 177 of file Buffer.h.

◆ remaining()

template<typename BufferT >
constexpr SWC_CAN_INLINE size_t SWC::Core::BufferDyn< BufferT >::remaining ( ) const
inlineconstexprnoexcept

Definition at line 187 of file Buffer.h.

◆ set()

template<typename BufferT >
void SWC::Core::BufferDyn< BufferT >::set ( const value_type data,
size_t  len 
)
inline

Definition at line 266 of file Buffer.h.

◆ set_mark()

template<typename BufferT >
constexpr SWC_CAN_INLINE void SWC::Core::BufferDyn< BufferT >::set_mark ( )
inlineconstexprnoexcept

Definition at line 202 of file Buffer.h.

Referenced by SWC::Ranger::CompactRange::InBlock::add(), SWC::Ranger::Callback::RangeQuerySelectDeleting::update(), and SWC::Ranger::Callback::RangeQuerySelectUpdating::update().

+ Here is the caller graph for this function:

◆ take_ownership() [1/2]

template<typename BufferT >
void SWC::Core::BufferDyn< BufferT >::take_ownership ( BufferDyn< BufferT > &  other)
inlinenoexcept

Definition at line 272 of file Buffer.h.

Referenced by SWC::Core::BufferStreamIn::add(), SWC::Core::BufferStreamIn_ZSTD::add(), SWC::Ranger::CompactRange::InBlock::finalize_encode(), and SWC::Ranger::Callback::RangeQuerySelect::response().

+ Here is the caller graph for this function:

◆ take_ownership() [2/2]

template<typename BufferT >
void SWC::Core::BufferDyn< BufferT >::take_ownership ( BufferT &  other)
inlinenoexcept

Definition at line 283 of file Buffer.h.

Member Data Documentation

◆ mark

◆ ptr


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