#include <block_builder.h>
Definition at line 17 of file block_builder.h.
§ BlockBuilder() [1/2]
| leveldb::BlockBuilder::BlockBuilder |
( |
const Options * |
options | ) |
|
|
explicit |
Definition at line 39 of file block_builder.cc.
44 assert(options->block_restart_interval >= 1);
std::vector< uint32_t > restarts_
§ BlockBuilder() [2/2]
| leveldb::BlockBuilder::BlockBuilder |
( |
const BlockBuilder & |
| ) |
|
|
private |
§ Add()
| void leveldb::BlockBuilder::Add |
( |
const Slice & |
key, |
|
|
const Slice & |
value |
|
) |
| |
Definition at line 73 of file block_builder.cc.
76 assert(counter_ <= options_->block_restart_interval);
80 if (counter_ < options_->block_restart_interval) {
82 const size_t min_length = std::min(last_key_piece.size(), key.size());
83 while ((shared < min_length) && (last_key_piece[shared] == key[shared])) {
91 const size_t non_shared = key.size() - shared;
99 buffer_.append(key.data() + shared, non_shared);
100 buffer_.append(value.data(), value.size());
104 last_key_.append(key.data() + shared, non_shared);
std::vector< uint32_t > restarts_
const Comparator * comparator
virtual int Compare(const Slice &a, const Slice &b) const =0
void PutVarint32(std::string *dst, uint32_t v)
§ CurrentSizeEstimate()
| size_t leveldb::BlockBuilder::CurrentSizeEstimate |
( |
| ) |
const |
§ empty()
| bool leveldb::BlockBuilder::empty |
( |
| ) |
const |
|
inline |
§ Finish()
| Slice leveldb::BlockBuilder::Finish |
( |
| ) |
|
Definition at line 63 of file block_builder.cc.
65 for (
size_t i = 0; i <
restarts_.size(); i++) {
void PutFixed32(std::string *dst, uint32_t value)
std::vector< uint32_t > restarts_
§ operator=()
| void leveldb::BlockBuilder::operator= |
( |
const BlockBuilder & |
| ) |
|
|
private |
§ Reset()
| void leveldb::BlockBuilder::Reset |
( |
| ) |
|
§ buffer_
| std::string leveldb::BlockBuilder::buffer_ |
|
private |
§ counter_
| int leveldb::BlockBuilder::counter_ |
|
private |
§ finished_
| bool leveldb::BlockBuilder::finished_ |
|
private |
§ last_key_
| std::string leveldb::BlockBuilder::last_key_ |
|
private |
§ options_
| const Options* leveldb::BlockBuilder::options_ |
|
private |
§ restarts_
| std::vector<uint32_t> leveldb::BlockBuilder::restarts_ |
|
private |
The documentation for this class was generated from the following files: