#include <swcdb/db/Cells/Interval.h>
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 |
Interval & | operator= (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 |
Friends | |
std::ostream & | operator<< (std::ostream &out, const Interval &intval) |
Definition at line 17 of file Interval.h.
|
inlineexplicitnoexcept |
Definition at line 28 of file Interval.h.
|
inlineexplicit |
Definition at line 37 of file Interval.h.
|
inlineexplicit |
Definition at line 50 of file Interval.h.
|
inlineexplicitnoexcept |
Definition at line 62 of file Interval.h.
|
noexcept |
Definition at line 14 of file Interval.cc.
|
inline |
Definition at line 159 of file Interval.h.
References SWC::DB::KeySeq::align(), aligned_max, aligned_min, and key_seq.
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.
|
inline |
Definition at line 152 of file Interval.h.
References aligned_max, and aligned_min.
Referenced by SWC::Ranger::Range::_run_add_queue(), SWC::Ranger::CommitLog::Fragments::expand_and_align(), SWC::Ranger::CellStore::Readers::expand_and_align(), SWC::Ranger::CompactRange::InBlock::finalize_interval(), SWC::Ranger::CellStore::Read::load_blocks_index(), SWC::DB::Cells::Mutable::write_and_free(), and SWC::DB::Cells::Result::write_and_free().
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().
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().
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().
|
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().
|
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().
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.
|
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.
void SWC::DB::Cells::Interval::expand | ( | const Interval & | other | ) |
Definition at line 38 of file Interval.cc.
References SWC::DB::Specs::Timestamp::comp, SWC::DB::Specs::Timestamp::empty(), is_in_begin(), is_in_end(), SWC::DB::Specs::Timestamp::is_matching(), key_begin, key_end, SWC::Condition::NONE, set_key_begin(), set_key_end(), set_ts_earliest(), set_ts_latest(), ts_earliest, ts_latest, SWC::DB::Specs::Timestamp::value, and was_set.
Referenced by SWC::Ranger::CommitLog::Fragments::expand(), SWC::Ranger::CellStore::Readers::expand(), SWC::Ranger::CommitLog::Fragments::expand_and_align(), SWC::Ranger::CellStore::Readers::expand_and_align(), SWC::Ranger::CompactRange::InBlock::finalize_interval(), SWC::Ranger::CellStore::Read::load_blocks_index(), SWC::DB::Cells::Mutable::write_and_free(), and SWC::DB::Cells::Result::write_and_free().
|
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().
|
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().
|
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().
|
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().
|
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().
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().
|
inline |
Definition at line 119 of file Interval.h.
References aligned_max, SWC::DB::Cell::KeyVec::copy(), and was_set.
Referenced by copy().
|
inline |
Definition at line 113 of file Interval.h.
References aligned_min, SWC::DB::Cell::KeyVec::copy(), and was_set.
Referenced by copy().
|
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().
|
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().
|
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().
|
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().
|
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().
|
friend |
Definition at line 219 of file Interval.h.
DB::Cell::KeyVec SWC::DB::Cells::Interval::aligned_max |
Definition at line 229 of file Interval.h.
Referenced by align(), SWC::Ranger::Range::check_meta(), copy(), decode(), encode(), encoded_length(), equal(), SWC::Ranger::Range::expand_and_align(), free(), SWC::Ranger::Range::on_change(), print(), and set_aligned_max().
DB::Cell::KeyVec SWC::DB::Cells::Interval::aligned_min |
Definition at line 228 of file Interval.h.
Referenced by align(), SWC::Ranger::Range::check_meta(), copy(), decode(), encode(), encoded_length(), equal(), SWC::Ranger::Range::expand_and_align(), free(), SWC::Ranger::Range::on_change(), print(), set_aligned_min(), and size_of_internal().
DB::Cell::Key SWC::DB::Cells::Interval::key_begin |
Definition at line 224 of file Interval.h.
Referenced by SWC::Ranger::Range::_get_interval(), SWC::Ranger::Range::_is_any_begin(), SWC::Ranger::Range::check_meta(), copy(), SWC::Ranger::CellStore::create_initial(), decode(), encode(), encoded_length(), SWC::Manager::Range::equal(), equal(), expand(), SWC::Ranger::Range::expand_and_align(), expand_begin(), SWC::Ranger::CompactRange::finalize(), free(), SWC::Ranger::Block::is_consist(), is_in_begin(), SWC::Ranger::Range::known_interval_count(), SWC::Ranger::CellStore::Read::load_blocks_index(), SWC::Ranger::Range::on_change(), print(), SWC::Manager::Range::set(), set_key_begin(), and size_of_internal().
DB::Cell::Key SWC::DB::Cells::Interval::key_end |
Definition at line 225 of file Interval.h.
Referenced by SWC::Ranger::Range::_get_interval(), SWC::Ranger::Range::_is_any_end(), SWC::Ranger::Range::_run_add_queue(), SWC::Comm::Protocol::Rgr::Params::Report::RspColumnsRanges::Range::before(), SWC::Ranger::Range::check_meta(), copy(), SWC::Ranger::CellStore::create_initial(), decode(), encode(), encoded_length(), SWC::Manager::Range::equal(), equal(), expand(), SWC::Ranger::Range::expand_and_align(), expand_end(), SWC::Ranger::CompactRange::finalize(), free(), SWC::Ranger::Block::is_consist(), is_in_end(), SWC::Ranger::Range::known_interval_count(), SWC::Ranger::CellStore::Read::load_blocks_index(), SWC::Ranger::Range::on_change(), print(), SWC::Manager::Range::set(), set_key_end(), and size_of_internal().
const Types::KeySeq SWC::DB::Cells::Interval::key_seq |
Definition at line 25 of file Interval.h.
Referenced by align(), is_in_begin(), is_in_end(), SWC::Ranger::CellStore::Read::load_blocks_index(), and SWC::Ranger::CommitLog::Fragment::split().
Specs::Timestamp SWC::DB::Cells::Interval::ts_earliest |
Definition at line 226 of file Interval.h.
Referenced by SWC::Ranger::Range::check_meta(), copy(), decode(), encode(), encoded_length(), equal(), expand(), free(), print(), and set_ts_earliest().
Specs::Timestamp SWC::DB::Cells::Interval::ts_latest |
Definition at line 227 of file Interval.h.
Referenced by SWC::Ranger::Range::check_meta(), copy(), decode(), encode(), encoded_length(), equal(), expand(), free(), print(), and set_ts_latest().
bool SWC::DB::Cells::Interval::was_set |
Definition at line 230 of file Interval.h.
Referenced by SWC::Ranger::Range::check_meta(), copy(), decode(), equal(), expand(), expand_begin(), expand_end(), free(), print(), set_aligned_max(), set_aligned_min(), set_key_begin(), set_key_end(), set_ts_earliest(), and set_ts_latest().