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::Interval Class Referencefinal

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

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

Public Member Functions

SWC_CAN_INLINE Interval (const Types::KeySeq a_key_seq) noexcept
 
SWC_CAN_INLINE Interval (const Types::KeySeq a_key_seq, const uint8_t **ptr, size_t *remain)
 
SWC_CAN_INLINE Interval (const Interval &other)
 
SWC_CAN_INLINE Interval (Interval &&other) noexcept
 
Intervaloperator= (const Interval &)=delete
 
 ~Interval () noexcept
 
void copy (const Interval &other)
 
void free () noexcept
 
SWC_CAN_INLINE size_t size_of_internal () const noexcept
 
SWC_CAN_INLINE void set_key_begin (const DB::Cell::Key &key)
 
SWC_CAN_INLINE void set_key_end (const DB::Cell::Key &key)
 
constexpr SWC_CAN_INLINE void set_ts_earliest (const Specs::Timestamp &ts)
 
constexpr SWC_CAN_INLINE void set_ts_latest (const Specs::Timestamp &ts)
 
SWC_CAN_INLINE void set_aligned_min (const DB::Cell::KeyVec &key)
 
SWC_CAN_INLINE void set_aligned_max (const DB::Cell::KeyVec &key)
 
void expand (const Interval &other)
 
void expand (const Cell &cell)
 
SWC_CAN_INLINE void expand_begin (const Cell &cell)
 
SWC_CAN_INLINE void expand_end (const Cell &cell)
 
SWC_CAN_INLINE void expand (const int64_t &ts)
 
SWC_CAN_INLINE bool align (const Interval &other)
 
bool align (const DB::Cell::KeyVec &_min, const DB::Cell::KeyVec &_max)
 
SWC_CAN_INLINE bool align (const DB::Cell::Key &key)
 
SWC_CAN_INLINE bool SWC_PURE_FUNC equal (const Interval &other) const noexcept
 
SWC_CAN_INLINE bool is_in_begin (const DB::Cell::Key &key) const
 
SWC_CAN_INLINE bool is_in_end (const DB::Cell::Key &key) const
 
size_t SWC_PURE_FUNC encoded_length () const noexcept
 
void encode (uint8_t **ptr) const
 
void decode (const uint8_t **ptr, size_t *remain, bool owner)
 
void print (std::ostream &out) const
 

Public Attributes

const Types::KeySeq key_seq
 
DB::Cell::Key key_begin
 
DB::Cell::Key key_end
 
Specs::Timestamp ts_earliest
 
Specs::Timestamp ts_latest
 
DB::Cell::KeyVec aligned_min
 
DB::Cell::KeyVec aligned_max
 
bool was_set
 

Friends

std::ostream & operator<< (std::ostream &out, const Interval &intval)
 

Detailed Description

Definition at line 17 of file Interval.h.

Constructor & Destructor Documentation

◆ Interval() [1/4]

SWC_CAN_INLINE SWC::DB::Cells::Interval::Interval ( const Types::KeySeq  a_key_seq)
inlineexplicitnoexcept

Definition at line 28 of file Interval.h.

◆ Interval() [2/4]

SWC_CAN_INLINE SWC::DB::Cells::Interval::Interval ( const Types::KeySeq  a_key_seq,
const uint8_t **  ptr,
size_t *  remain 
)
inlineexplicit

Definition at line 37 of file Interval.h.

◆ Interval() [3/4]

SWC_CAN_INLINE SWC::DB::Cells::Interval::Interval ( const Interval other)
inlineexplicit

Definition at line 50 of file Interval.h.

◆ Interval() [4/4]

SWC_CAN_INLINE SWC::DB::Cells::Interval::Interval ( Interval &&  other)
inlineexplicitnoexcept

Definition at line 62 of file Interval.h.

◆ ~Interval()

SWC::DB::Cells::Interval::~Interval ( )
noexcept

Definition at line 14 of file Interval.cc.

Member Function Documentation

◆ align() [1/3]

SWC_CAN_INLINE bool SWC::DB::Cells::Interval::align ( const DB::Cell::Key key)
inline

Definition at line 159 of file Interval.h.

References SWC::DB::KeySeq::align(), aligned_max, aligned_min, and key_seq.

+ Here is the call graph for this function:

◆ align() [2/3]

SWC_SHOULD_INLINE bool SWC::DB::Cells::Interval::align ( const DB::Cell::KeyVec _min,
const DB::Cell::KeyVec _max 
)

Definition at line 68 of file Interval.cc.

References SWC::DB::KeySeq::align(), aligned_max, aligned_min, SWC::Condition::GT, key_seq, and SWC::Condition::LT.

+ Here is the call graph for this function:

◆ align() [3/3]

SWC_CAN_INLINE bool SWC::DB::Cells::Interval::align ( const Interval other)
inline

◆ copy()

void SWC::DB::Cells::Interval::copy ( const Interval other)

Definition at line 16 of file Interval.cc.

References aligned_max, aligned_min, key_begin, key_end, set_aligned_max(), set_aligned_min(), set_key_begin(), set_key_end(), set_ts_earliest(), set_ts_latest(), ts_earliest, ts_latest, and was_set.

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

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

◆ decode()

void SWC::DB::Cells::Interval::decode ( const uint8_t **  ptr,
size_t *  remain,
bool  owner 
)

Definition at line 135 of file Interval.cc.

References aligned_max, aligned_min, SWC::DB::Cell::KeyVec::decode(), SWC::DB::Specs::Timestamp::decode(), SWC::DB::Cell::Key::decode(), key_begin, key_end, ts_earliest, ts_latest, and was_set.

Referenced by SWC::Ranger::CellStore::Block::Header::decode_idx(), SWC::Comm::Protocol::Rgr::Params::RangeLoaded::internal_decode(), and SWC::Ranger::CommitLog::Fragment::load_header().

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

◆ encode()

void SWC::DB::Cells::Interval::encode ( uint8_t **  ptr) const

Definition at line 126 of file Interval.cc.

References aligned_max, aligned_min, SWC::DB::Cell::Key::encode(), SWC::DB::Cell::KeyVec::encode(), SWC::DB::Specs::Timestamp::encode(), key_begin, key_end, ts_earliest, and ts_latest.

Referenced by SWC::Ranger::CellStore::Block::Header::encode_idx(), SWC::Comm::Protocol::Rgr::Params::RangeLoaded::internal_encode(), and SWC::Ranger::CommitLog::Fragment::write().

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

◆ encoded_length()

size_t SWC::DB::Cells::Interval::encoded_length ( ) const
noexcept

Definition at line 117 of file Interval.cc.

References aligned_max, aligned_min, SWC::DB::Cell::Key::encoded_length(), SWC::DB::Cell::KeyVec::encoded_length(), SWC::DB::Specs::Timestamp::encoded_length(), key_begin, key_end, ts_earliest, and ts_latest.

Referenced by SWC::Ranger::CellStore::Block::Header::encoded_length_idx(), SWC::Comm::Protocol::Rgr::Params::RangeLoaded::internal_encoded_length(), and SWC::Ranger::CommitLog::Fragment::write().

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

◆ equal()

SWC_CAN_INLINE bool SWC_PURE_FUNC SWC::DB::Cells::Interval::equal ( const Interval other) const
inlinenoexcept

Definition at line 164 of file Interval.h.

References aligned_max, aligned_min, SWC::DB::Cell::Key::equal(), SWC::DB::Cell::KeyVec::equal(), SWC::DB::Specs::Timestamp::equal(), key_begin, key_end, ts_earliest, ts_latest, and was_set.

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

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

◆ expand() [1/3]

void SWC::DB::Cells::Interval::expand ( const Cell cell)

Definition at line 60 of file Interval.cc.

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

+ Here is the call graph for this function:

◆ expand() [2/3]

SWC_CAN_INLINE void SWC::DB::Cells::Interval::expand ( const int64_t &  ts)
inline

Definition at line 143 of file Interval.h.

References SWC::DB::Specs::Timestamp::empty(), SWC::Condition::GE, SWC::DB::Specs::Timestamp::is_matching(), SWC::Condition::LE, SWC::DB::Specs::Timestamp::set(), ts_earliest, ts_latest, and was_set.

+ Here is the call graph for this function:

◆ expand() [3/3]

void SWC::DB::Cells::Interval::expand ( const Interval other)

◆ expand_begin()

SWC_CAN_INLINE void SWC::DB::Cells::Interval::expand_begin ( const Cell cell)
inline

Definition at line 129 of file Interval.h.

References SWC::DB::Cell::Key::copy(), SWC::DB::Cell::Key::empty(), is_in_begin(), SWC::DB::Cells::Cell::key, key_begin, and was_set.

Referenced by expand(), SWC::DB::Cells::Mutable::expand_begin(), SWC::Ranger::CompactRange::InBlock::finalize_interval(), SWC::DB::Cells::Mutable::write_and_free(), and SWC::DB::Cells::Result::write_and_free().

+ 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::Interval::expand_end ( const Cell cell)
inline

Definition at line 136 of file Interval.h.

References SWC::DB::Cell::Key::copy(), SWC::DB::Cell::Key::empty(), is_in_end(), SWC::DB::Cells::Cell::key, key_end, and was_set.

Referenced by expand(), SWC::DB::Cells::Mutable::expand_end(), SWC::Ranger::CompactRange::InBlock::finalize_interval(), SWC::DB::Cells::Mutable::write_and_free(), and SWC::DB::Cells::Result::write_and_free().

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

◆ free()

void SWC::DB::Cells::Interval::free ( )
noexcept

Definition at line 28 of file Interval.cc.

References aligned_max, aligned_min, SWC::Core::Vector< T, SizeT, GROW_SZ >::clear(), SWC::DB::Cell::Key::free(), SWC::DB::Specs::Timestamp::free(), key_begin, key_end, ts_earliest, ts_latest, and was_set.

Referenced by SWC::Ranger::Range::expand_and_align(), and SWC::Ranger::Range::load().

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

◆ is_in_begin()

SWC_CAN_INLINE bool SWC::DB::Cells::Interval::is_in_begin ( const DB::Cell::Key key) const
inline

Definition at line 179 of file Interval.h.

References SWC::DB::KeySeq::compare(), SWC::DB::Cell::Key::empty(), key_begin, key_seq, and SWC::Condition::LT.

Referenced by expand(), and expand_begin().

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

◆ is_in_end()

SWC_CAN_INLINE bool SWC::DB::Cells::Interval::is_in_end ( const DB::Cell::Key key) const
inline

Definition at line 186 of file Interval.h.

References SWC::DB::KeySeq::compare(), SWC::DB::Cell::Key::empty(), SWC::Condition::GT, key_end, and key_seq.

Referenced by SWC::Comm::Protocol::Rgr::Params::Report::RspColumnsRanges::Range::before(), expand(), and expand_end().

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

◆ operator=()

Interval& SWC::DB::Cells::Interval::operator= ( const Interval )
delete

◆ print()

void SWC::DB::Cells::Interval::print ( std::ostream &  out) const

Definition at line 146 of file Interval.cc.

References aligned_max, aligned_min, key_begin, key_end, ts_earliest, ts_latest, and was_set.

Referenced by SWC::Ranger::Range::check_meta(), SWC::Ranger::CellStore::Read::make(), and SWC::Ranger::Range::print().

+ Here is the caller graph for this function:

◆ set_aligned_max()

SWC_CAN_INLINE void SWC::DB::Cells::Interval::set_aligned_max ( const DB::Cell::KeyVec key)
inline

Definition at line 119 of file Interval.h.

References aligned_max, SWC::DB::Cell::KeyVec::copy(), and was_set.

Referenced by copy().

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

◆ set_aligned_min()

SWC_CAN_INLINE void SWC::DB::Cells::Interval::set_aligned_min ( const DB::Cell::KeyVec key)
inline

Definition at line 113 of file Interval.h.

References aligned_min, SWC::DB::Cell::KeyVec::copy(), and was_set.

Referenced by copy().

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

◆ set_key_begin()

SWC_CAN_INLINE void SWC::DB::Cells::Interval::set_key_begin ( const DB::Cell::Key key)
inline

Definition at line 89 of file Interval.h.

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

Referenced by copy(), and expand().

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

◆ set_key_end()

SWC_CAN_INLINE void SWC::DB::Cells::Interval::set_key_end ( const DB::Cell::Key key)
inline

Definition at line 95 of file Interval.h.

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

Referenced by copy(), and expand().

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

◆ set_ts_earliest()

constexpr SWC_CAN_INLINE void SWC::DB::Cells::Interval::set_ts_earliest ( const Specs::Timestamp ts)
inlineconstexpr

Definition at line 101 of file Interval.h.

References SWC::DB::Specs::Timestamp::copy(), ts_earliest, and was_set.

Referenced by copy(), and expand().

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

◆ set_ts_latest()

constexpr SWC_CAN_INLINE void SWC::DB::Cells::Interval::set_ts_latest ( const Specs::Timestamp ts)
inlineconstexpr

Definition at line 107 of file Interval.h.

References SWC::DB::Specs::Timestamp::copy(), ts_latest, and was_set.

Referenced by copy(), and expand().

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

◆ size_of_internal()

SWC_CAN_INLINE size_t SWC::DB::Cells::Interval::size_of_internal ( ) const
inlinenoexcept

Definition at line 82 of file Interval.h.

References aligned_min, key_begin, key_end, SWC::DB::Cell::Key::size, and SWC::DB::Cell::KeyVec::size_of_internal().

+ Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const Interval intval 
)
friend

Definition at line 219 of file Interval.h.

Member Data Documentation

◆ aligned_max

◆ aligned_min

◆ key_begin

◆ key_end

◆ key_seq

const Types::KeySeq SWC::DB::Cells::Interval::key_seq

◆ ts_earliest

Specs::Timestamp SWC::DB::Cells::Interval::ts_earliest

◆ ts_latest

Specs::Timestamp SWC::DB::Cells::Interval::ts_latest

◆ was_set


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