|
SWC-DB
v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
|
Go to the documentation of this file.
7 #ifndef swcdb_ranger_db_CellStore_h
8 #define swcdb_ranger_db_CellStore_h
13 namespace SWC {
namespace Ranger {
54 uint32_t& blks_idx_count,
55 uint64_t& blks_idx_offset,
56 bool close_after=
false,
bool chk_base=
false);
104 void close(
int &err);
110 size_t size_bytes(
bool only_loaded=false) const;
116 void print(std::ostream& out,
bool minimal=true) const;
130 typedef std::shared_ptr<Write>
Ptr;
150 void create(
int& err, uint8_t blk_replicas=0);
158 void finalize(
int& err);
162 void print(std::ostream& out)
const;
168 void write_blocks_index(
int& err, uint32_t& blks_idx_count);
170 void write_trailer(
int& err);
172 void close_and_validate(
int& err);
187 #endif // swcdb_ranger_db_CellStore_h
Core::Vector< Block::Write::Ptr > blocks
const uint32_t block_size
size_t size_bytes_enc(bool only_loaded=false) const
Read(const csid_t csid, DB::Cell::Key &&prev_key_end, DB::Cell::Key &&key_end, DB::Cells::Interval &&interval, Blocks &&blocks, const uint32_t cell_revs, const FS::SmartFd::Ptr &smartfd) noexcept
void get_blocks(int &err, Blocks &to) const
Read(const Read &&)=delete
const DB::Cells::Interval interval
const DB::Cell::Key key_end
Core::Vector< Write::Ptr > Writers
std::shared_ptr< Write > Ptr
static const uint8_t IDX_BLKS_HEADER_SIZE
size_t release(size_t bytes)
Core::Vector< Block::Read::Ptr > Blocks
static Read::Ptr create_initial(int &err, const RangePtr &range)
const DB::Cell::Key prev_key_end
static const int8_t VERSION
static bool load_trailer(int &err, FS::SmartFd::Ptr &smartfd, uint32_t &cell_revs, uint32_t &blks_idx_count, uint64_t &blks_idx_offset, bool close_after=false, bool chk_base=false)
void create(const ConnHandlerPtr &conn, const Event::Ptr &ev)
static constexpr uint32_t MAX_BLOCKS
std::shared_ptr< Range > RangePtr
Read & operator=(const Read &)=delete
The SWC-DB C++ namespace 'SWC'.
static void load_blocks_index(int &err, FS::SmartFd::Ptr &smartfd, DB::Cell::Key &prev_key_end, DB::Cell::Key &key_end, DB::Cells::Interval &interval, Blocks &blocks, uint32_t &cell_revs, bool chk_base=false)
static Ptr make(int &err, const csid_t csid, const RangePtr &range, bool chk_base=false)
void load_cells(BlockLoader *loader)
static const uint8_t TRAILER_SIZE
bool processing() const noexcept
Read(const Read &)=delete
const DB::Types::Encoder encoder
size_t size_bytes(bool only_loaded=false) const
Core::QueueSafeStated< Block::Read::Ptr > m_queue
std::shared_ptr< SmartFd > Ptr
std::shared_ptr< Writers > WritersPtr
size_t blocks_count() const
const DB::Cell::Key prev_key_end
void print(std::ostream &out, bool minimal=true) const
const std::string & filepath() const