| /leveldb-1.20/include/leveldb/ |
| H A D | status.h | 35 static Status NotFound(const Slice& msg, const Slice& msg2 = Slice()) { 38 static Status Corruption(const Slice& msg, const Slice& msg2 = Slice()) { 41 static Status NotSupported(const Slice& msg, const Slice& msg2 = Slice()) { 44 static Status InvalidArgument(const Slice& msg, const Slice& msg2 = Slice()) { 47 static Status IOError(const Slice& msg, const Slice& msg2 = Slice()) { 94 Status(Code code, const Slice& msg, const Slice& msg2);
|
| H A D | slice.h | 25 class Slice { 28 Slice() : data_(""), size_(0) { } in Slice() function 31 Slice(const char* d, size_t n) : data_(d), size_(n) { } in Slice() function 34 Slice(const std::string& s) : data_(s.data()), size_(s.size()) { } in Slice() function 37 Slice(const char* s) : data_(s), size_(strlen(s)) { } in Slice() function 72 int compare(const Slice& b) const; 75 bool starts_with(const Slice& x) const { in starts_with() 87 inline bool operator==(const Slice& x, const Slice& y) { 92 inline bool operator!=(const Slice& x, const Slice& y) { 96 inline int Slice::compare(const Slice& b) const { in compare()
|
| H A D | db.h | 34 Slice start; // Included in the range 35 Slice limit; // Not included in the range 38 Range(const Slice& s, const Slice& l) : start(s), limit(l) { } in Range() 62 const Slice& key, 63 const Slice& value) = 0; 69 virtual Status Delete(const WriteOptions& options, const Slice& key) = 0; 84 const Slice& key, std::string* value) = 0; 120 virtual bool GetProperty(const Slice& property, std::string* value) = 0; 143 virtual void CompactRange(const Slice* begin, const Slice* end) = 0;
|
| H A D | write_batch.h | 29 class Slice; variable 37 void Put(const Slice& key, const Slice& value); 40 void Delete(const Slice& key); 49 virtual void Put(const Slice& key, const Slice& value) = 0; 50 virtual void Delete(const Slice& key) = 0;
|
| H A D | table.h | 56 uint64_t ApproximateOffsetOf(const Slice& key) const; 63 static Iterator* BlockReader(void*, const ReadOptions&, const Slice&); 70 const ReadOptions&, const Slice& key, 72 void (*handle_result)(void* arg, const Slice& k, const Slice& v)); 76 void ReadFilter(const Slice& filter_handle_value);
|
| H A D | filter_policy.h | 23 class Slice; variable 41 virtual void CreateFilter(const Slice* keys, int n, std::string* dst) 49 virtual bool KeyMayMatch(const Slice& key, const Slice& filter) const = 0;
|
| H A D | comparator.h | 12 class Slice; variable 26 virtual int Compare(const Slice& a, const Slice& b) const = 0; 48 const Slice& limit) const = 0;
|
| /leveldb-1.20/db/ |
| H A D | dbformat.h | 71 Slice user_key; 94 extern bool ParseInternalKey(const Slice& internal_key, 98 inline Slice ExtractUserKey(const Slice& internal_key) { in ExtractUserKey() 119 virtual int Compare(const Slice& a, const Slice& b) const; 122 const Slice& limit) const; 138 virtual bool KeyMayMatch(const Slice& key, const Slice& filter) const; 154 Slice Encode() const { in Encode() 176 inline bool ParseInternalKey(const Slice& internal_key, in ParseInternalKey() 198 Slice memtable_key() const { return Slice(start_, end_ - start_); } in memtable_key() 201 Slice internal_key() const { return Slice(kstart_, end_ - kstart_); } in internal_key() [all …]
|
| H A D | memtable.cc | 14 static Slice GetLengthPrefixedSlice(const char* data) { in GetLengthPrefixedSlice() 18 return Slice(p, len); in GetLengthPrefixedSlice() 36 Slice a = GetLengthPrefixedSlice(aptr); in operator ()() 37 Slice b = GetLengthPrefixedSlice(bptr); in operator ()() 62 virtual Slice value() const { in value() 63 Slice key_slice = GetLengthPrefixedSlice(iter_.key()); in value() 83 const Slice& key, in Add() 84 const Slice& value) { in Add() 109 Slice memkey = key.memtable_key(); in Get() 126 Slice(key_ptr, key_length - 8), in Get() [all …]
|
| H A D | dbformat.cc | 50 int InternalKeyComparator::Compare(const Slice& akey, const Slice& bkey) const { in Compare() 70 const Slice& limit) const { in FindShortestSeparator() 72 Slice user_start = ExtractUserKey(*start); in FindShortestSeparator() 73 Slice user_limit = ExtractUserKey(limit); in FindShortestSeparator() 88 Slice user_key = ExtractUserKey(*key); in FindShortSuccessor() 105 void InternalFilterPolicy::CreateFilter(const Slice* keys, int n, in CreateFilter() 109 Slice* mkey = const_cast<Slice*>(keys); in CreateFilter() 117 bool InternalFilterPolicy::KeyMayMatch(const Slice& key, const Slice& f) const { in KeyMayMatch() 121 LookupKey::LookupKey(const Slice& user_key, SequenceNumber s) { in LookupKey()
|
| H A D | write_batch_test.cc | 65 batch.Put(Slice("foo"), Slice("bar")); in TEST() 66 batch.Delete(Slice("box")); in TEST() 67 batch.Put(Slice("baz"), Slice("boo")); in TEST() 79 batch.Put(Slice("foo"), Slice("bar")); in TEST() 80 batch.Delete(Slice("box")); in TEST() 82 Slice contents = WriteBatchInternal::Contents(&batch); in TEST() 84 Slice(contents.data(),contents.size()-1)); in TEST()
|
| H A D | write_batch.cc | 43 Slice input(rep_); in Iterate() 49 Slice key, value; in Iterate() 98 void WriteBatch::Put(const Slice& key, const Slice& value) { in Put() 105 void WriteBatch::Delete(const Slice& key) { in Delete() 117 virtual void Put(const Slice& key, const Slice& value) { in Put() 121 virtual void Delete(const Slice& key) { in Delete() 122 mem_->Add(sequence_, kTypeDeletion, key, Slice()); in Delete() 136 void WriteBatchInternal::SetContents(WriteBatch* b, const Slice& contents) { in SetContents()
|
| H A D | db_bench.cc | 144 Slice Generate(size_t len) { in Generate() 155 static Slice TrimSpace(Slice s) { in TrimSpace() 220 void AddMessage(Slice msg) { in AddMessage() 254 void Report(const Slice& name) { in Report() 387 Slice key = TrimSpace(Slice(line, sep - 1 - line)); in PrintEnvironment() 388 Slice val = TrimSpace(Slice(sep + 1)); in PrintEnvironment() 440 Slice name; in Run() 460 if (name == Slice("open")) { in Run() 511 } else if (name == Slice("crc32c")) { in Run() 521 } else if (name == Slice("stats")) { in Run() [all …]
|
| H A D | c.cc | 37 using leveldb::Slice; 73 virtual int Compare(const Slice& a, const Slice& b) const { in Compare() 121 virtual bool KeyMayMatch(const Slice& key, const Slice& filter) const { in KeyMayMatch() 177 db->rep->Put(options->rep, Slice(key, keylen), Slice(val, vallen))); in leveldb_put() 271 Slice a, b; in leveldb_compact_range() 310 iter->rep->Seek(Slice(k, klen)); in leveldb_iter_seek() 322 Slice s = iter->rep->key(); in leveldb_iter_key() 328 Slice s = iter->rep->value(); in leveldb_iter_value() 353 b->rep.Put(Slice(key, klen), Slice(val, vlen)); in leveldb_writebatch_put() 372 virtual void Put(const Slice& key, const Slice& value) { in leveldb_writebatch_iterate() [all …]
|
| H A D | db_impl.h | 32 virtual Status Put(const WriteOptions&, const Slice& key, const Slice& value); 33 virtual Status Delete(const WriteOptions&, const Slice& key); 36 const Slice& key, 41 virtual bool GetProperty(const Slice& property, std::string* value); 43 virtual void CompactRange(const Slice* begin, const Slice* end); 48 void TEST_CompactRange(int level, const Slice* begin, const Slice* end); 65 void RecordReadSample(Slice key);
|
| H A D | filename.cc | 15 extern Status WriteStringToFileSync(Env* env, const Slice& data, 83 Slice rest(fname); in ParseFileName() 111 Slice suffix = rest; in ParseFileName() 112 if (suffix == Slice(".log")) { in ParseFileName() 114 } else if (suffix == Slice(".sst") || suffix == Slice(".ldb")) { in ParseFileName() 116 } else if (suffix == Slice(".dbtmp")) { in ParseFileName() 130 Slice contents = manifest; in SetCurrentFile()
|
| H A D | version_set.h | 44 const Slice& key); 56 const Slice* smallest_user_key, 57 const Slice* largest_user_key); 85 bool RecordReadSample(Slice key); 103 const Slice* smallest_user_key, 104 const Slice* largest_user_key); 108 int PickLevelForMemTableOutput(const Slice& smallest_user_key, 109 const Slice& largest_user_key); 128 void ForEachOverlapping(Slice user_key, Slice internal_key, 355 bool IsBaseLevelForKey(const Slice& user_key); [all …]
|
| /leveldb-1.20/doc/bench/ |
| H A D | db_bench_tree_db.cc | 108 Slice Generate(int len) { in Generate() 114 return Slice(data_.data() + pos_ - len, len); in Generate() 118 static Slice TrimSpace(Slice s) { in TrimSpace() 127 return Slice(s.data() + start, limit - start); in TrimSpace() 200 Slice key = TrimSpace(Slice(line, sep - 1 - line)); in PrintEnvironment() 201 Slice val = TrimSpace(Slice(sep + 1)); in PrintEnvironment() 252 void Stop(const Slice& name) { in Stop() 326 Slice name; in Run() 339 if (name == Slice("fillseq")) { in Run() 345 } else if (name == Slice("overwrite")) { in Run() [all …]
|
| H A D | db_bench_sqlite3.cc | 139 Slice Generate(int len) { in Generate() 149 static Slice TrimSpace(Slice s) { in TrimSpace() 158 return Slice(s.data() + start, limit - start); in TrimSpace() 224 Slice key = TrimSpace(Slice(line, sep - 1 - line)); in PrintEnvironment() 225 Slice val = TrimSpace(Slice(sep + 1)); in PrintEnvironment() 276 void Stop(const Slice& name) { in Stop() 350 Slice name; in Run() 364 if (name == Slice("fillseq")) { in Run() 376 } else if (name == Slice("overwrite")) { in Run() 396 } else if (name == Slice("readseq")) { in Run() [all …]
|
| /leveldb-1.20/table/ |
| H A D | filter_block.cc | 30 void FilterBlockBuilder::AddKey(const Slice& key) { in AddKey() 31 Slice k = key; in AddKey() 36 Slice FilterBlockBuilder::Finish() { in Finish() 49 return Slice(result_); in Finish() 66 tmp_keys_[i] = Slice(base, length); in GenerateFilter() 79 const Slice& contents) in FilterBlockReader() 95 bool FilterBlockReader::KeyMayMatch(uint64_t block_offset, const Slice& key) { in KeyMayMatch() 101 Slice filter = Slice(data_ + start, limit - start); in KeyMayMatch()
|
| H A D | filter_block.h | 34 void AddKey(const Slice& key); 35 Slice Finish(); 44 std::vector<Slice> tmp_keys_; // policy_->CreateFilter() argument 55 FilterBlockReader(const FilterPolicy* policy, const Slice& contents); 56 bool KeyMayMatch(uint64_t block_offset, const Slice& key);
|
| H A D | block_builder.cc | 63 Slice BlockBuilder::Finish() { in Finish() 70 return Slice(buffer_); in Finish() 73 void BlockBuilder::Add(const Slice& key, const Slice& value) { in Add() 74 Slice last_key_piece(last_key_); in Add() 105 assert(Slice(last_key_) == key); in Add()
|
| H A D | table.cc | 48 Slice footer_input; in Open() 113 if (iter->Valid() && iter->key() == Slice(key)) { in ReadMeta() 120 void Table::ReadFilter(const Slice& filter_handle_value) { in ReadFilter() 121 Slice v = filter_handle_value; in ReadFilter() 151 static void DeleteCachedBlock(const Slice& key, void* value) { in DeleteCachedBlock() 166 const Slice& index_value) { in BlockReader() 173 Slice input = index_value; in BlockReader() 184 Slice key(cache_key_buffer, sizeof(cache_key_buffer)); in BlockReader() 228 void (*saver)(void*, const Slice&, const Slice&)) { in InternalGet() 233 Slice handle_value = iiter->value(); in InternalGet() [all …]
|
| /leveldb-1.20/util/ |
| H A D | logging.h | 18 class Slice; variable 26 extern void AppendEscapedStringTo(std::string* str, const Slice& value); 33 extern std::string EscapeString(const Slice& value); 39 extern bool ConsumeDecimalNumber(Slice* in, uint64_t* val);
|
| H A D | cache.cc | 44 void (*deleter)(const Slice&, void* value); 55 Slice key() const { in key() 59 return *(reinterpret_cast<Slice*>(value)); in key() 61 return Slice(key_data, key_length); in key() 76 LRUHandle* Lookup(const Slice& key, uint32_t hash) { in Lookup() 96 LRUHandle* Remove(const Slice& key, uint32_t hash) { in Remove() 167 void Erase(const Slice& key, uint32_t hash); 271 void (*deleter)(const Slice& key, void* value)) { in Insert() 344 static inline uint32_t HashSlice(const Slice& s) { in HashSlice() 366 virtual Handle* Lookup(const Slice& key) { in Lookup() [all …]
|