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::DB::Cells::Mutable Class Referencefinal

#include <swcdb/db/Cells/Mutable.h>

+ Collaboration diagram for SWC::DB::Cells::Mutable:

Public Types

typedef std::shared_ptr< MutablePtr
 
using Iterator = Container::Iterator
 
using ConstIterator = Container::ConstIterator
 

Public Member Functions

SWC_CAN_INLINE Mutable (const Types::KeySeq a_key_seq, const uint32_t a_max_revs=1, const uint64_t ttl_ns=0, const Types::Column a_type=Types::Column::PLAIN)
 
SWC_CAN_INLINE Mutable (const Types::KeySeq a_key_seq, const uint32_t a_max_revs, const uint64_t ttl_ns, const Types::Column a_type, const StaticBuffer &buffer)
 
SWC_CAN_INLINE Mutable (Mutable &&other) noexcept
 
 Mutable (const Mutable &)=delete
 
Mutableoperator= (const Mutable &other)=delete
 
SWC_CAN_INLINE Mutableoperator= (Mutable &&other) noexcept
 
SWC_CAN_INLINE void take_sorted (Mutable &other)
 
void configure (const uint32_t revs, const uint64_t ttl_ns, const Types::Column typ, bool finalized)
 
SWC_CAN_INLINE ~Mutable () noexcept
 
SWC_CAN_INLINE void free () noexcept
 
SWC_CAN_INLINE void reset (const uint32_t revs=1, const uint64_t ttl_ns=0, const Types::Column typ=Types::Column::PLAIN)
 
constexpr SWC_CAN_INLINE size_t size () const noexcept
 
constexpr SWC_CAN_INLINE size_t size_bytes () const noexcept
 
constexpr SWC_CAN_INLINE bool empty () const noexcept
 
constexpr SWC_CAN_INLINE size_t size_of_internal () const noexcept
 
constexpr SWC_CAN_INLINE Cellfront () noexcept
 
constexpr SWC_CAN_INLINE Cellback () noexcept
 
constexpr SWC_CAN_INLINE Cellfront () const noexcept
 
constexpr SWC_CAN_INLINE Cellback () const noexcept
 
constexpr SWC_CAN_INLINE bool has_one_key () const noexcept
 
template<typename T >
constexpr SWC_CAN_INLINEget () noexcept
 
template<typename T >
constexpr SWC_CAN_INLINEget () const noexcept
 
template<typename T >
constexpr T get (size_t offset) noexcept
 
template<typename T >
constexpr T get (size_t offset) const noexcept
 
template<typename T >
SWC_CAN_INLINEget (const Specs::Interval &specs) const
 
template<typename T >
SWC_CAN_INLINEget (const DB::Cell::Key &key)
 
template<typename T >
get (const DB::Cell::Key &key, size_t &offset)
 
template<typename T >
SWC_CAN_INLINEget (const DB::Cell::Key &key) const
 
template<typename T >
get (const DB::Cell::Key &key, size_t &offset) const
 
constexpr SWC_CAN_INLINE Iterator GetIterator () noexcept
 
constexpr SWC_CAN_INLINE Iterator GetIterator (size_t offset) noexcept
 
constexpr SWC_CAN_INLINE ConstIterator GetConstIterator () const noexcept
 
constexpr SWC_CAN_INLINE ConstIterator GetConstIterator (size_t offset) const noexcept
 
constexpr SWC_CAN_INLINE Celloperator[] (size_t pos) noexcept
 
SWC_CAN_INLINE void get (int32_t pos, DB::Cell::Key &key) const
 
SWC_CAN_INLINE bool get (const DB::Cell::Key &key, Condition::Comp comp, DB::Cell::Key &res) const
 
SWC_CAN_INLINE void takeout (size_t pos, Cell *&cell)
 
SWC_CAN_INLINE void takeout_begin (size_t pos, Cell *&cell)
 
SWC_CAN_INLINE void takeout_end (size_t pos, Cell *&cell)
 
SWC_CAN_INLINE void add_sorted (const Cell &cell, bool no_value=false)
 
SWC_CAN_INLINE void add_sorted (Cell *cell)
 
SWC_CAN_INLINE size_t add_sorted (const uint8_t *ptr, size_t remain)
 
SWC_CAN_INLINE void add_raw (const DynamicBuffer &cells, bool finalized)
 
SWC_CAN_INLINE void add_raw (const DynamicBuffer &cells, const DB::Cell::Key &upto_key, const DB::Cell::Key &from_key, uint32_t skip, bool malformed, bool finalized)
 
SWC_CAN_INLINE void add_raw (const Cell &e_cell, bool finalized)
 
SWC_CAN_INLINE void add_raw (const Cell &e_cell, size_t *offsetp, bool finalized)
 
SWC_CAN_INLINE void add_raw (const Cell &e_cell, size_t *offsetp, Iterator &it, bool finalized)
 
SWC_CAN_INLINE void finalize_raw ()
 
void write_and_free (DynamicBuffer &cells, uint32_t &cell_count, Interval &intval, uint32_t threshold, uint32_t max_cells)
 
bool write_and_free (const DB::Cell::Key &key_start, const DB::Cell::Key &key_finish, DynamicBuffer &cells, uint32_t threshold)
 
bool write_and_free (DynamicBuffer &cells, uint32_t threshold)
 
SWC_CAN_INLINE void write (DynamicBuffer &cells) const
 
SWC_CAN_INLINE void check_sequence (const char *msg, bool w_assert=true) const
 
SWC_CAN_INLINE void scan (ReqScan *req) const
 
void scan_version_single (ReqScan *req) const
 
void scan_version_multi (ReqScan *req) const
 
void scan_test_use (const Specs::Interval &specs, DynamicBuffer &result, size_t &count, size_t &skips) const
 
SWC_CAN_INLINE bool scan_after (const DB::Cell::Key &after, const DB::Cell::Key &to, Mutable &cells, bool finalized) const
 
SWC_CAN_INLINE bool split (Mutable &cells, size_t count, size_t bytes, bool loaded)
 
SWC_CAN_INLINE void expand (Interval &interval) const
 
SWC_CAN_INLINE void expand_begin (Interval &interval) const
 
SWC_CAN_INLINE void expand_end (Interval &interval) const
 
void print (std::ostream &out, bool with_cells=false) const
 

Static Public Member Functions

static SWC_CAN_INLINE Ptr make (const Types::KeySeq key_seq, const uint32_t max_revs=1, const uint64_t ttl_ns=0, const Types::Column type=Types::Column::PLAIN)
 

Public Attributes

const Types::KeySeq key_seq
 
Types::Column type
 
uint32_t max_revs
 
uint64_t ttl
 

Private Types

using VectorT = Core::Vector< Cell *, uint32_t >
 
typedef Core::VectorsVector< Core::Vector< VectorT, uint32_t, 1 >, VectorT, 8192 > Container
 

Private Member Functions

void _add_remove (const Cell &e_cell, Iterator &it, size_t &offset)
 
void _add_unfinalized (const Cell &e_cell, Iterator &it, size_t &offset)
 
void _add_plain_version_single (const Cell &e_cell, Iterator &it, size_t &offset)
 
void _add_plain_version_multi (const Cell &e_cell, Iterator &it, size_t &offset)
 
void _add_counter (const Cell &e_cell, Iterator &it, size_t &offset)
 
void _finalize_counter ()
 
constexpr SWC_CAN_INLINE void _add (const Cell &cell) noexcept
 
constexpr SWC_CAN_INLINE void _remove (const Cell &cell) noexcept
 
SWC_CAN_INLINE void _adjust_copy (Cell &cell, const Cell &other)
 
SWC_CAN_INLINE void _insert (Iterator &it, const Cell &cell)
 
SWC_CAN_INLINE void _remove (Iterator &it)
 
SWC_CAN_INLINE void _remove (Iterator &it, size_t number, bool wdel=true)
 
SWC_CAN_INLINE void _remove_overhead (Iterator &it, const DB::Cell::Key &key, uint32_t revs)
 

Private Attributes

Container _container
 
size_t _bytes
 
size_t _size
 

Static Private Attributes

constexpr static const uint8_t NARROW_SIZE = 20
 

Detailed Description

Definition at line 21 of file Mutable.h.

Member Typedef Documentation

◆ ConstIterator

using SWC::DB::Cells::Mutable::ConstIterator = Container::ConstIterator

Definition at line 69 of file Mutable.h.

◆ Container

Definition at line 38 of file Mutable.h.

◆ Iterator

using SWC::DB::Cells::Mutable::Iterator = Container::Iterator

Definition at line 68 of file Mutable.h.

◆ Ptr

typedef std::shared_ptr<Mutable> SWC::DB::Cells::Mutable::Ptr

Definition at line 66 of file Mutable.h.

◆ VectorT

using SWC::DB::Cells::Mutable::VectorT = Core::Vector<Cell*, uint32_t>
private

Definition at line 33 of file Mutable.h.

Constructor & Destructor Documentation

◆ Mutable() [1/4]

SWC_CAN_INLINE SWC::DB::Cells::Mutable::Mutable ( const Types::KeySeq  a_key_seq,
const uint32_t  a_max_revs = 1,
const uint64_t  ttl_ns = 0,
const Types::Column  a_type = Types::Column::PLAIN 
)
inline

Definition at line 86 of file Mutable.h.

Referenced by make().

+ Here is the caller graph for this function:

◆ Mutable() [2/4]

SWC_CAN_INLINE SWC::DB::Cells::Mutable::Mutable ( const Types::KeySeq  a_key_seq,
const uint32_t  a_max_revs,
const uint64_t  ttl_ns,
const Types::Column  a_type,
const StaticBuffer buffer 
)
inline

Definition at line 95 of file Mutable.h.

References add_sorted(), SWC::Core::Buffer< T >::base, and SWC::Core::Buffer< T >::size.

+ Here is the call graph for this function:

◆ Mutable() [3/4]

SWC_CAN_INLINE SWC::DB::Cells::Mutable::Mutable ( Mutable &&  other)
inlinenoexcept

Definition at line 106 of file Mutable.h.

◆ Mutable() [4/4]

SWC::DB::Cells::Mutable::Mutable ( const Mutable )
delete

◆ ~Mutable()

SWC_CAN_INLINE SWC::DB::Cells::Mutable::~Mutable ( )
inlinenoexcept

Definition at line 151 of file Mutable.h.

Member Function Documentation

◆ _add()

constexpr SWC_CAN_INLINE void SWC::DB::Cells::Mutable::_add ( const Cell cell)
inlineconstexprprivatenoexcept

Definition at line 683 of file Mutable.h.

References _bytes, and _size.

Referenced by _add_counter(), _insert(), add_sorted(), and split().

+ Here is the caller graph for this function:

◆ _add_counter()

void SWC::DB::Cells::Mutable::_add_counter ( const Cell e_cell,
Mutable::Iterator it,
size_t &  offset 
)
private

Definition at line 473 of file Mutable.cc.

References _add(), _adjust_copy(), _bytes, _container, _remove(), SWC::DB::KeySeq::compare(), SWC::DB::Cells::Cell::get_counter(), SWC::DB::Cells::Cell::get_revision(), SWC::DB::Cells::Cell::get_timestamp(), SWC::Condition::GT, SWC::DB::Cells::Cell::key, key_seq, SWC::Condition::LT, SWC::DB::Cells::OP_EQUAL, SWC::Core::VectorsVector< VectorsT, VectorT, SIZE, GROW, SPLIT >::push_back(), SWC::DB::Cells::Cell::set_counter(), SWC::DB::Cells::TIMESTAMP_AUTO, SWC::DB::Cells::TIMESTAMP_NULL, ttl, and type.

Referenced by add_raw().

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

◆ _add_plain_version_multi()

void SWC::DB::Cells::Mutable::_add_plain_version_multi ( const Cell e_cell,
Mutable::Iterator it,
size_t &  offset 
)
private

Definition at line 404 of file Mutable.cc.

References _adjust_copy(), _insert(), _remove(), _remove_overhead(), add_sorted(), SWC::DB::KeySeq::compare(), SWC::DB::Cells::Cell::get_revision(), SWC::DB::Cells::Cell::get_timestamp(), SWC::Condition::GT, SWC::DB::Cells::Cell::is_time_order_desc(), SWC::DB::Cells::Cell::key, key_seq, SWC::Condition::LT, max_revs, SWC::DB::Cells::TIMESTAMP_AUTO, and ttl.

Referenced by add_raw().

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

◆ _add_plain_version_single()

void SWC::DB::Cells::Mutable::_add_plain_version_single ( const Cell e_cell,
Mutable::Iterator it,
size_t &  offset 
)
private

Definition at line 366 of file Mutable.cc.

References _adjust_copy(), _insert(), _remove(), add_sorted(), SWC::DB::KeySeq::compare(), SWC::DB::Cells::Cell::get_revision(), SWC::DB::Cells::Cell::get_timestamp(), SWC::Condition::GT, SWC::DB::Cells::Cell::key, key_seq, SWC::Condition::LT, SWC::DB::Cells::TIMESTAMP_AUTO, and ttl.

Referenced by add_raw().

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

◆ _add_remove()

void SWC::DB::Cells::Mutable::_add_remove ( const Cell e_cell,
Mutable::Iterator it,
size_t &  offset 
)
private

Definition at line 279 of file Mutable.cc.

References _insert(), _remove(), add_sorted(), SWC::DB::KeySeq::compare(), SWC::DB::Cells::Cell::get_revision(), SWC::DB::Cells::Cell::get_timestamp(), SWC::Condition::GT, SWC::DB::Cells::Cell::is_removing(), SWC::DB::Cells::Cell::key, key_seq, SWC::Condition::LT, SWC::DB::Cells::TIMESTAMP_AUTO, and ttl.

Referenced by add_raw().

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

◆ _add_unfinalized()

void SWC::DB::Cells::Mutable::_add_unfinalized ( const Cell e_cell,
Mutable::Iterator it,
size_t &  offset 
)
private

Definition at line 321 of file Mutable.cc.

References _insert(), _remove(), add_sorted(), SWC::DB::KeySeq::compare(), SWC::DB::Cells::Cell::get_revision(), SWC::DB::Cells::Cell::get_timestamp(), SWC::Condition::GT, SWC::DB::Cells::Cell::key, key_seq, SWC::Condition::LT, SWC::DB::Cells::TIMESTAMP_AUTO, and ttl.

Referenced by add_raw().

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

◆ _adjust_copy()

SWC_CAN_INLINE void SWC::DB::Cells::Mutable::_adjust_copy ( Cell cell,
const Cell other 
)
inlineprivate

Definition at line 695 of file Mutable.h.

References _bytes, SWC::DB::Cells::Cell::copy(), and SWC::DB::Cells::Cell::encoded_length().

Referenced by _add_counter(), _add_plain_version_multi(), and _add_plain_version_single().

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

◆ _finalize_counter()

void SWC::DB::Cells::Mutable::_finalize_counter ( )
private

Definition at line 556 of file Mutable.cc.

References add_sorted(), SWC::DB::Cell::Key::equal(), SWC::DB::Cells::Cell::get_counter(), SWC::DB::Cells::Cell::get_revision(), SWC::DB::Cells::Cell::get_timestamp(), SWC::DB::Cells::Cell::key, key_seq, max_revs, SWC::DB::Cells::OP_EQUAL, SWC::DB::Cells::Cell::set_counter(), SWC::DB::Cells::Cell::set_revision(), SWC::DB::Cells::Cell::set_timestamp(), SWC::DB::Cells::Cell::set_timestamp_with_rev_is_ts(), SWC::DB::Cells::TIMESTAMP_NULL, ttl, and type.

Referenced by finalize_raw().

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

◆ _insert()

SWC_CAN_INLINE void SWC::DB::Cells::Mutable::_insert ( Iterator it,
const Cell cell 
)
inlineprivate

Definition at line 702 of file Mutable.h.

References _add().

Referenced by _add_plain_version_multi(), _add_plain_version_single(), _add_remove(), and _add_unfinalized().

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

◆ _remove() [1/3]

constexpr SWC_CAN_INLINE void SWC::DB::Cells::Mutable::_remove ( const Cell cell)
inlineconstexprprivatenoexcept

Definition at line 689 of file Mutable.h.

References _bytes, and _size.

Referenced by _add_counter(), _add_plain_version_multi(), _add_plain_version_single(), _add_remove(), _add_unfinalized(), _remove(), _remove_overhead(), configure(), takeout(), and write_and_free().

+ Here is the caller graph for this function:

◆ _remove() [2/3]

SWC_CAN_INLINE void SWC::DB::Cells::Mutable::_remove ( Iterator it)
inlineprivate

Definition at line 709 of file Mutable.h.

References _remove().

+ Here is the call graph for this function:

◆ _remove() [3/3]

SWC_CAN_INLINE void SWC::DB::Cells::Mutable::_remove ( Iterator it,
size_t  number,
bool  wdel = true 
)
inlineprivate

Definition at line 716 of file Mutable.h.

References _remove().

+ Here is the call graph for this function:

◆ _remove_overhead()

SWC_CAN_INLINE void SWC::DB::Cells::Mutable::_remove_overhead ( Iterator it,
const DB::Cell::Key key,
uint32_t  revs 
)
inlineprivate

Definition at line 728 of file Mutable.h.

References _remove(), SWC::DB::Cell::Key::equal(), SWC::DB::Cells::INSERT, and max_revs.

Referenced by _add_plain_version_multi(), and configure().

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

◆ add_raw() [1/5]

SWC_CAN_INLINE void SWC::DB::Cells::Mutable::add_raw ( const Cell e_cell,
bool  finalized 
)
inline

Definition at line 468 of file Mutable.h.

References add_raw().

+ Here is the call graph for this function:

◆ add_raw() [2/5]

SWC_CAN_INLINE void SWC::DB::Cells::Mutable::add_raw ( const Cell e_cell,
size_t *  offsetp,
bool  finalized 
)
inline

Definition at line 474 of file Mutable.h.

References add_raw(), and SWC::DB::Cells::Cell::key.

+ Here is the call graph for this function:

◆ add_raw() [3/5]

SWC_CAN_INLINE void SWC::DB::Cells::Mutable::add_raw ( const Cell e_cell,
size_t *  offsetp,
Iterator it,
bool  finalized 
)
inline

Definition at line 480 of file Mutable.h.

References _add_counter(), _add_plain_version_multi(), _add_plain_version_single(), _add_remove(), _add_unfinalized(), SWC::DB::Types::is_counter(), max_revs, SWC::DB::Cells::Cell::removal(), and type.

+ Here is the call graph for this function:

◆ add_raw() [4/5]

SWC_CAN_INLINE void SWC::DB::Cells::Mutable::add_raw ( const DynamicBuffer cells,
bool  finalized 
)
inline

Definition at line 436 of file Mutable.h.

References SWC::Core::Buffer< T >::base, and SWC::Core::BufferDyn< BufferT >::fill().

Referenced by SWC::client::Query::Update::Handlers::ColumnMutable::add(), SWC::Ranger::Block::add_logged(), SWC::DB::Cells::MutableVec::add_raw(), add_raw(), SWC::Ranger::Block::load_cells(), scan_after(), SWC::Ranger::Callback::RangeQuerySelectDeleting::update(), and SWC::Ranger::Callback::RangeQuerySelectUpdating::update().

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

◆ add_raw() [5/5]

SWC_CAN_INLINE void SWC::DB::Cells::Mutable::add_raw ( const DynamicBuffer cells,
const DB::Cell::Key upto_key,
const DB::Cell::Key from_key,
uint32_t  skip,
bool  malformed,
bool  finalized 
)
inline

Definition at line 447 of file Mutable.h.

References add_raw(), SWC::Core::Buffer< T >::base, SWC::DB::KeySeq::compare(), SWC::DB::Cell::Key::empty(), SWC::Core::BufferDyn< BufferT >::fill(), SWC::Condition::GT, and key_seq.

+ Here is the call graph for this function:

◆ add_sorted() [1/3]

SWC_CAN_INLINE void SWC::DB::Cells::Mutable::add_sorted ( Cell cell)
inline

Definition at line 418 of file Mutable.h.

References _add(), _container, and SWC::Core::VectorsVector< VectorsT, VectorT, SIZE, GROW, SPLIT >::push_back().

+ Here is the call graph for this function:

◆ add_sorted() [2/3]

SWC_CAN_INLINE void SWC::DB::Cells::Mutable::add_sorted ( const Cell cell,
bool  no_value = false 
)
inline

Definition at line 413 of file Mutable.h.

Referenced by _add_plain_version_multi(), _add_plain_version_single(), _add_remove(), _add_unfinalized(), _finalize_counter(), SWC::Ranger::Block::load_cells(), Mutable(), and split().

+ Here is the caller graph for this function:

◆ add_sorted() [3/3]

SWC_CAN_INLINE size_t SWC::DB::Cells::Mutable::add_sorted ( const uint8_t *  ptr,
size_t  remain 
)
inline

Definition at line 424 of file Mutable.h.

References _bytes, _container, _size, and SWC::Core::VectorsVector< VectorsT, VectorT, SIZE, GROW, SPLIT >::push_back().

+ Here is the call graph for this function:

◆ back() [1/2]

constexpr SWC_CAN_INLINE Cell& SWC::DB::Cells::Mutable::back ( ) const
inlineconstexprnoexcept

Definition at line 213 of file Mutable.h.

References _container, and SWC::Core::VectorsVector< VectorsT, VectorT, SIZE, GROW, SPLIT >::back().

+ Here is the call graph for this function:

◆ back() [2/2]

constexpr SWC_CAN_INLINE Cell& SWC::DB::Cells::Mutable::back ( )
inlineconstexprnoexcept

Definition at line 203 of file Mutable.h.

References _container, and SWC::Core::VectorsVector< VectorsT, VectorT, SIZE, GROW, SPLIT >::back().

Referenced by SWC::Ranger::Block::_split(), SWC::DB::Cells::MutableVec::check_sequence(), expand_end(), and has_one_key().

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

◆ check_sequence()

SWC_CAN_INLINE void SWC::DB::Cells::Mutable::check_sequence ( const char *  msg,
bool  w_assert = true 
) const
inline

Definition at line 525 of file Mutable.h.

References SWC::DB::KeySeq::compare(), SWC::Condition::GT, key_seq, SWC::LOG_ERROR, SWC_ASSERT, SWC_LOG_OSTREAM, and SWC_LOG_OUT.

Referenced by SWC::DB::Cells::MutableVec::check_sequence().

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

◆ configure()

void SWC::DB::Cells::Mutable::configure ( const uint32_t  revs,
const uint64_t  ttl_ns,
const Types::Column  typ,
bool  finalized 
)

Definition at line 13 of file Mutable.cc.

References _remove(), _remove_overhead(), empty(), SWC::DB::Types::is_counter(), SWC::DB::Cells::Cell::key, max_revs, ttl, and type.

Referenced by reset(), and SWC::Ranger::Block::schema_update().

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

◆ empty()

constexpr SWC_CAN_INLINE bool SWC::DB::Cells::Mutable::empty ( ) const
inlineconstexprnoexcept

Definition at line 185 of file Mutable.h.

References _size.

Referenced by configure(), SWC::client::Query::Update::Handlers::ColumnMutable::empty(), SWC::Ranger::Block::load_cells(), and take_sorted().

+ Here is the caller graph for this function:

◆ expand()

SWC_CAN_INLINE void SWC::DB::Cells::Mutable::expand ( Interval interval) const
inline

Definition at line 647 of file Mutable.h.

References _size, expand_begin(), and expand_end().

+ Here is the call graph for this function:

◆ expand_begin()

SWC_CAN_INLINE void SWC::DB::Cells::Mutable::expand_begin ( Interval interval) const
inline

Definition at line 654 of file Mutable.h.

References SWC::DB::Cells::Interval::expand_begin(), and front().

Referenced by expand().

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

◆ expand_end()

SWC_CAN_INLINE void SWC::DB::Cells::Mutable::expand_end ( Interval interval) const
inline

Definition at line 659 of file Mutable.h.

References back(), and SWC::DB::Cells::Interval::expand_end().

Referenced by expand().

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

◆ finalize_raw()

SWC_CAN_INLINE void SWC::DB::Cells::Mutable::finalize_raw ( )
inline

Definition at line 496 of file Mutable.h.

References _finalize_counter(), SWC::DB::Types::is_counter(), size(), and type.

Referenced by SWC::Ranger::Block::load_final().

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

◆ free()

SWC_CAN_INLINE void SWC::DB::Cells::Mutable::free ( )
inlinenoexcept

Definition at line 157 of file Mutable.h.

References _bytes, _container, _size, SWC::Core::Vector< T, SizeT, GROW_SZ >::clear(), and SWC::Core::Vector< T, SizeT, GROW_SZ >::shrink_to_fit().

Referenced by operator=(), SWC::Ranger::Block::release(), reset(), split(), and write_and_free().

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

◆ front() [1/2]

constexpr SWC_CAN_INLINE Cell& SWC::DB::Cells::Mutable::front ( ) const
inlineconstexprnoexcept

Definition at line 208 of file Mutable.h.

References _container, and SWC::Core::VectorsVector< VectorsT, VectorT, SIZE, GROW, SPLIT >::front().

+ Here is the call graph for this function:

◆ front() [2/2]

constexpr SWC_CAN_INLINE Cell& SWC::DB::Cells::Mutable::front ( )
inlineconstexprnoexcept

Definition at line 198 of file Mutable.h.

References _container, and SWC::Core::VectorsVector< VectorsT, VectorT, SIZE, GROW, SPLIT >::front().

Referenced by expand_begin(), and has_one_key().

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

◆ get() [1/11]

template<typename T >
constexpr SWC_CAN_INLINE T SWC::DB::Cells::Mutable::get ( ) const
inlineconstexprnoexcept

Definition at line 231 of file Mutable.h.

References _container, SWC::Core::VectorsVector< VectorsT, VectorT, SIZE, GROW, SPLIT >::get(), and SWC::Config::T.

+ Here is the call graph for this function:

◆ get() [2/11]

template<typename T >
constexpr SWC_CAN_INLINE T SWC::DB::Cells::Mutable::get ( )
inlineconstexprnoexcept

Definition at line 225 of file Mutable.h.

References _container, SWC::Core::VectorsVector< VectorsT, VectorT, SIZE, GROW, SPLIT >::get(), and SWC::Config::T.

Referenced by SWC::client::Query::Update::Handlers::ColumnMutable::get_first_key(), SWC::client::Query::Update::Handlers::ColumnMutable::get_key_next(), and split().

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

◆ get() [3/11]

template<typename T >
SWC_CAN_INLINE T SWC::DB::Cells::Mutable::get ( const DB::Cell::Key key)
inline

Definition at line 257 of file Mutable.h.

◆ get() [4/11]

template<typename T >
SWC_CAN_INLINE T SWC::DB::Cells::Mutable::get ( const DB::Cell::Key key) const
inline

Definition at line 299 of file Mutable.h.

◆ get() [5/11]

SWC_CAN_INLINE bool SWC::DB::Cells::Mutable::get ( const DB::Cell::Key key,
Condition::Comp  comp,
DB::Cell::Key res 
) const
inline

Definition at line 377 of file Mutable.h.

References SWC::DB::KeySeq::compare(), SWC::DB::Cell::Key::copy(), SWC::Condition::EQ, SWC::Condition::GE, SWC::Condition::GT, and key_seq.

+ Here is the call graph for this function:

◆ get() [6/11]

template<typename T >
T SWC::DB::Cells::Mutable::get ( const DB::Cell::Key key,
size_t &  offset 
)
inline

Definition at line 264 of file Mutable.h.

References _size, SWC::DB::KeySeq::compare(), SWC::DB::Cell::Key::empty(), SWC::Condition::GT, key_seq, max_revs, NARROW_SIZE, and SWC::Config::T.

+ Here is the call graph for this function:

◆ get() [7/11]

template<typename T >
T SWC::DB::Cells::Mutable::get ( const DB::Cell::Key key,
size_t &  offset 
) const
inline

Definition at line 306 of file Mutable.h.

References _size, SWC::DB::KeySeq::compare(), SWC::DB::Cell::Key::empty(), SWC::Condition::GT, key_seq, max_revs, NARROW_SIZE, and SWC::Config::T.

+ Here is the call graph for this function:

◆ get() [8/11]

template<typename T >
SWC_CAN_INLINE T SWC::DB::Cells::Mutable::get ( const Specs::Interval specs) const
inline

Definition at line 249 of file Mutable.h.

References SWC::DB::Cell::Key::empty(), SWC::DB::Specs::Interval::offset_key, and SWC::DB::Specs::Interval::range_begin.

+ Here is the call graph for this function:

◆ get() [9/11]

SWC_CAN_INLINE void SWC::DB::Cells::Mutable::get ( int32_t  pos,
DB::Cell::Key key 
) const
inline

Definition at line 368 of file Mutable.h.

References _size, and SWC::DB::Cell::Key::copy().

+ Here is the call graph for this function:

◆ get() [10/11]

template<typename T >
constexpr T SWC::DB::Cells::Mutable::get ( size_t  offset) const
inlinenoexcept

Definition at line 243 of file Mutable.h.

References _container, SWC::Core::VectorsVector< VectorsT, VectorT, SIZE, GROW, SPLIT >::get(), and SWC::Config::T.

+ Here is the call graph for this function:

◆ get() [11/11]

template<typename T >
constexpr T SWC::DB::Cells::Mutable::get ( size_t  offset)
inlinenoexcept

Definition at line 237 of file Mutable.h.

References _container, SWC::Core::VectorsVector< VectorsT, VectorT, SIZE, GROW, SPLIT >::get(), and SWC::Config::T.

+ Here is the call graph for this function:

◆ GetConstIterator() [1/2]

constexpr SWC_CAN_INLINE ConstIterator SWC::DB::Cells::Mutable::GetConstIterator ( ) const
inlineconstexprnoexcept

Definition at line 351 of file Mutable.h.

◆ GetConstIterator() [2/2]

constexpr SWC_CAN_INLINE ConstIterator SWC::DB::Cells::Mutable::GetConstIterator ( size_t  offset) const
inlineconstexprnoexcept

Definition at line 356 of file Mutable.h.

◆ GetIterator() [1/2]

constexpr SWC_CAN_INLINE Iterator SWC::DB::Cells::Mutable::GetIterator ( )
inlineconstexprnoexcept

Definition at line 341 of file Mutable.h.

◆ GetIterator() [2/2]

constexpr SWC_CAN_INLINE Iterator SWC::DB::Cells::Mutable::GetIterator ( size_t  offset)
inlineconstexprnoexcept

Definition at line 346 of file Mutable.h.

◆ has_one_key()

constexpr SWC_CAN_INLINE bool SWC::DB::Cells::Mutable::has_one_key ( ) const
inlineconstexprnoexcept

Definition at line 218 of file Mutable.h.

References back(), SWC::DB::Cell::Key::equal(), front(), and SWC::DB::Cells::Cell::key.

Referenced by SWC::Ranger::Block::_need_split(), and SWC::DB::Cells::MutableVec::split().

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

◆ make()

static SWC_CAN_INLINE Ptr SWC::DB::Cells::Mutable::make ( const Types::KeySeq  key_seq,
const uint32_t  max_revs = 1,
const uint64_t  ttl_ns = 0,
const Types::Column  type = Types::Column::PLAIN 
)
inlinestatic

Definition at line 77 of file Mutable.h.

References key_seq, max_revs, Mutable(), and type.

+ Here is the call graph for this function:

◆ operator=() [1/2]

Mutable& SWC::DB::Cells::Mutable::operator= ( const Mutable other)
delete

◆ operator=() [2/2]

SWC_CAN_INLINE Mutable& SWC::DB::Cells::Mutable::operator= ( Mutable &&  other)
inlinenoexcept

Definition at line 119 of file Mutable.h.

References _bytes, _container, _size, free(), max_revs, ttl, and type.

+ Here is the call graph for this function:

◆ operator[]()

constexpr SWC_CAN_INLINE Cell* SWC::DB::Cells::Mutable::operator[] ( size_t  pos)
inlineconstexprnoexcept

Definition at line 362 of file Mutable.h.

◆ print()

void SWC::DB::Cells::Mutable::print ( std::ostream &  out,
bool  with_cells = false 
) const

Definition at line 140 of file Mutable.cc.

References _bytes, _container, _size, max_revs, SWC::Core::VectorsVector< VectorsT, VectorT, SIZE, GROW, SPLIT >::print(), SWC::Core::VectorsVector< VectorsT, VectorT, SIZE, GROW, SPLIT >::size_of_internal(), SWC::DB::Types::to_string(), ttl, and type.

Referenced by SWC::Ranger::Block::print(), and SWC::client::Query::Update::Handlers::ColumnMutable::print().

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

◆ reset()

SWC_CAN_INLINE void SWC::DB::Cells::Mutable::reset ( const uint32_t  revs = 1,
const uint64_t  ttl_ns = 0,
const Types::Column  typ = Types::Column::PLAIN 
)
inline

Definition at line 167 of file Mutable.h.

References configure(), and free().

+ Here is the call graph for this function:

◆ scan()

SWC_CAN_INLINE void SWC::DB::Cells::Mutable::scan ( ReqScan req) const
inline

Definition at line 544 of file Mutable.h.

References _size, max_revs, scan_version_multi(), and scan_version_single().

Referenced by SWC::Ranger::Block::_scan().

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

◆ scan_after()

SWC_CAN_INLINE bool SWC::DB::Cells::Mutable::scan_after ( const DB::Cell::Key after,
const DB::Cell::Key to,
Mutable cells,
bool  finalized 
) const
inline

Definition at line 560 of file Mutable.h.

References _size, add_raw(), SWC::DB::KeySeq::compare(), SWC::DB::Cell::Key::empty(), SWC::Condition::GT, SWC::DB::Cells::Cell::has_expired(), SWC::DB::Cells::Cell::key, key_seq, and ttl.

+ Here is the call graph for this function:

◆ scan_test_use()

void SWC::DB::Cells::Mutable::scan_test_use ( const Specs::Interval specs,
DynamicBuffer result,
size_t &  count,
size_t &  skips 
) const

Definition at line 246 of file Mutable.cc.

References SWC::DB::Cells::Cell::flag, SWC::DB::Specs::Interval::flags, SWC::DB::Cells::Cell::has_expired(), SWC::DB::Cells::INSERT, SWC::DB::Specs::Interval::is_matching(), SWC::DB::Specs::Flags::is_only_deletes(), key_seq, SWC::DB::Specs::Flags::limit, SWC::DB::Specs::Flags::offset, ttl, and SWC::DB::Cells::Cell::write().

+ Here is the call graph for this function:

◆ scan_version_multi()

◆ scan_version_single()

void SWC::DB::Cells::Mutable::scan_version_single ( ReqScan req) const

Definition at line 162 of file Mutable.cc.

References SWC::DB::Cells::ReqScan::add_cell_and_more(), SWC::DB::Cells::Cell::flag, SWC::DB::Specs::Interval::flags, SWC::DB::Cells::Cell::has_expired(), SWC::DB::Cells::INSERT, SWC::DB::Specs::Flags::is_only_deletes(), key_seq, SWC::DB::Cells::ReqScan::offset_adjusted(), SWC::DB::Cells::ReqScan::profile, SWC::DB::Cells::ReqScan::selector(), SWC::DB::Cells::ReqScan::Profile::skip_cell(), SWC::DB::Cells::ReqScan::spec, and ttl.

Referenced by scan().

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

◆ size()

constexpr SWC_CAN_INLINE size_t SWC::DB::Cells::Mutable::size ( ) const
inlineconstexprnoexcept

Definition at line 175 of file Mutable.h.

References _size.

Referenced by SWC::Ranger::Block::_size(), SWC::client::Query::Update::Handlers::ColumnMutable::add(), finalize_raw(), SWC::client::Query::Update::Handlers::ColumnMutable::get_first_key(), SWC::client::Query::Update::Handlers::ColumnMutable::size(), and SWC::DB::Cells::MutableVec::split().

+ Here is the caller graph for this function:

◆ size_bytes()

constexpr SWC_CAN_INLINE size_t SWC::DB::Cells::Mutable::size_bytes ( ) const
inlineconstexprnoexcept

Definition at line 180 of file Mutable.h.

References _bytes.

Referenced by SWC::Ranger::Block::_need_split(), SWC::Ranger::Block::size_bytes(), and SWC::client::Query::Update::Handlers::ColumnMutable::size_bytes().

+ Here is the caller graph for this function:

◆ size_of_internal()

constexpr SWC_CAN_INLINE size_t SWC::DB::Cells::Mutable::size_of_internal ( ) const
inlineconstexprnoexcept

Definition at line 190 of file Mutable.h.

References _bytes, _container, _size, and SWC::Core::VectorsVector< VectorsT, VectorT, SIZE, GROW, SPLIT >::size_of_internal().

Referenced by SWC::Ranger::Block::_split(), SWC::Ranger::Block::load_cells(), SWC::Ranger::Block::load_final(), and SWC::Ranger::Block::size_of_internal().

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

◆ split()

SWC_CAN_INLINE bool SWC::DB::Cells::Mutable::split ( Mutable cells,
size_t  count,
size_t  bytes,
bool  loaded 
)
inline

Definition at line 583 of file Mutable.h.

References _add(), _bytes, _container, _size, add_sorted(), SWC::Core::Vector< T, SizeT, GROW_SZ >::cbegin(), free(), get(), SWC::Core::Vector< T, SizeT, GROW_SZ >::size(), SWC::Core::VectorsVector< VectorsT, VectorT, SIZE, GROW, SPLIT >::split(), and ttl.

Referenced by SWC::Ranger::Block::_split(), and SWC::DB::Cells::MutableVec::split().

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

◆ take_sorted()

SWC_CAN_INLINE void SWC::DB::Cells::Mutable::take_sorted ( Mutable other)
inline

Definition at line 133 of file Mutable.h.

References _bytes, _container, _size, SWC::Core::VectorsVector< VectorsT, VectorT, SIZE, GROW, SPLIT >::add(), and empty().

+ Here is the call graph for this function:

◆ takeout()

SWC_CAN_INLINE void SWC::DB::Cells::Mutable::takeout ( size_t  pos,
Cell *&  cell 
)
inline

Definition at line 393 of file Mutable.h.

References _remove().

Referenced by takeout_begin(), and takeout_end().

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

◆ takeout_begin()

SWC_CAN_INLINE void SWC::DB::Cells::Mutable::takeout_begin ( size_t  pos,
Cell *&  cell 
)
inline

Definition at line 402 of file Mutable.h.

References takeout().

+ Here is the call graph for this function:

◆ takeout_end()

SWC_CAN_INLINE void SWC::DB::Cells::Mutable::takeout_end ( size_t  pos,
Cell *&  cell 
)
inline

Definition at line 407 of file Mutable.h.

References _size, and takeout().

+ Here is the call graph for this function:

◆ write()

SWC_CAN_INLINE void SWC::DB::Cells::Mutable::write ( DynamicBuffer cells) const
inline

Definition at line 516 of file Mutable.h.

References _bytes, SWC::Core::BufferDyn< BufferT >::ensure(), and ttl.

+ Here is the call graph for this function:

◆ write_and_free() [1/3]

bool SWC::DB::Cells::Mutable::write_and_free ( const DB::Cell::Key key_start,
const DB::Cell::Key key_finish,
DynamicBuffer cells,
uint32_t  threshold 
)

Definition at line 70 of file Mutable.cc.

References _bytes, _remove(), _size, SWC::DB::KeySeq::compare(), SWC::DB::Cell::Key::empty(), SWC::Core::BufferDyn< BufferT >::ensure(), SWC::Core::BufferDyn< BufferT >::fill(), free(), SWC::Condition::GT, key_seq, SWC::Condition::LT, and ttl.

+ Here is the call graph for this function:

◆ write_and_free() [2/3]

void SWC::DB::Cells::Mutable::write_and_free ( DynamicBuffer cells,
uint32_t &  cell_count,
Interval intval,
uint32_t  threshold,
uint32_t  max_cells 
)

Definition at line 34 of file Mutable.cc.

References _bytes, _remove(), _size, SWC::DB::Cells::Interval::align(), SWC::Core::BufferDyn< BufferT >::ensure(), SWC::DB::Cells::Interval::expand(), SWC::DB::Cells::Interval::expand_begin(), SWC::DB::Cells::Interval::expand_end(), SWC::Core::BufferDyn< BufferT >::fill(), free(), SWC::DB::Cells::Cell::get_timestamp(), SWC::DB::Cells::Cell::key, ttl, and SWC::DB::Cells::Cell::write().

Referenced by SWC::client::Query::Update::Handlers::ColumnMutable::get_buff().

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

◆ write_and_free() [3/3]

bool SWC::DB::Cells::Mutable::write_and_free ( DynamicBuffer cells,
uint32_t  threshold 
)

Definition at line 115 of file Mutable.cc.

References _bytes, _remove(), _size, SWC::Core::BufferDyn< BufferT >::ensure(), SWC::Core::BufferDyn< BufferT >::fill(), free(), and ttl.

+ Here is the call graph for this function:

Member Data Documentation

◆ _bytes

size_t SWC::DB::Cells::Mutable::_bytes
private

◆ _container

Container SWC::DB::Cells::Mutable::_container
private

◆ _size

size_t SWC::DB::Cells::Mutable::_size
private

◆ key_seq

◆ max_revs

uint32_t SWC::DB::Cells::Mutable::max_revs

◆ NARROW_SIZE

constexpr static const uint8_t SWC::DB::Cells::Mutable::NARROW_SIZE = 20
staticconstexprprivate

Definition at line 61 of file Mutable.h.

Referenced by get().

◆ ttl

◆ type

Types::Column SWC::DB::Cells::Mutable::type

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