MCPcopy Create free account
hub / github.com/baidu/tera / Lookup

Method Lookup

src/leveldb/util/cache_test.cc:198–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196 ~BlockBasedCacheTest() { delete cache_; }
197
198 int Lookup(int key) {
199 Cache::Handle* handle = cache_->Lookup(EncodeKey(key));
200 const int r = (handle == NULL) ? -1 : DecodeValue(cache_->Value(handle));
201 if (handle != NULL) {
202 cache_->Release(handle);
203 }
204 return r;
205 }
206
207 void Insert(int key, int value, bool force_release = true) {
208 Cache::Handle* handle = cache_->Insert(EncodeKey(key), EncodeValue(value), 0xffffffffffffffff,

Callers

nothing calls this directly

Calls 5

DecodeValueFunction · 0.85
EncodeKeyFunction · 0.70
LookupMethod · 0.45
ValueMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected