Lines Matching refs:key
55 Slice key() const { in key() function
76 LRUHandle* Lookup(const Slice& key, uint32_t hash) { in Lookup() argument
77 return *FindPointer(key, hash); in Lookup()
81 LRUHandle** ptr = FindPointer(h->key(), h->hash); in Insert()
96 LRUHandle* Remove(const Slice& key, uint32_t hash) { in Remove() argument
97 LRUHandle** ptr = FindPointer(key, hash); in Remove()
116 LRUHandle** FindPointer(const Slice& key, uint32_t hash) { in FindPointer() argument
119 ((*ptr)->hash != hash || key != (*ptr)->key())) { in FindPointer()
162 Cache::Handle* Insert(const Slice& key, uint32_t hash,
164 void (*deleter)(const Slice& key, void* value));
165 Cache::Handle* Lookup(const Slice& key, uint32_t hash);
167 void Erase(const Slice& key, uint32_t hash);
234 (*e->deleter)(e->key(), e->value); in Unref()
255 Cache::Handle* LRUCache::Lookup(const Slice& key, uint32_t hash) { in Lookup() argument
257 LRUHandle* e = table_.Lookup(key, hash); in Lookup()
270 const Slice& key, uint32_t hash, void* value, size_t charge, in Insert() argument
271 void (*deleter)(const Slice& key, void* value)) { in Insert() argument
275 malloc(sizeof(LRUHandle)-1 + key.size())); in Insert()
279 e->key_length = key.size(); in Insert()
283 memcpy(e->key_data, key.data(), key.size()); in Insert()
296 bool erased = FinishErase(table_.Remove(old->key(), old->hash)); in Insert()
318 void LRUCache::Erase(const Slice& key, uint32_t hash) { in Erase() argument
320 FinishErase(table_.Remove(key, hash)); in Erase()
328 bool erased = FinishErase(table_.Remove(e->key(), e->hash)); in Prune()
361 virtual Handle* Insert(const Slice& key, void* value, size_t charge, in Insert() argument
362 void (*deleter)(const Slice& key, void* value)) { in Insert() argument
363 const uint32_t hash = HashSlice(key); in Insert()
364 return shard_[Shard(hash)].Insert(key, hash, value, charge, deleter); in Insert()
366 virtual Handle* Lookup(const Slice& key) { in Lookup() argument
367 const uint32_t hash = HashSlice(key); in Lookup()
368 return shard_[Shard(hash)].Lookup(key, hash); in Lookup()
374 virtual void Erase(const Slice& key) { in Erase() argument
375 const uint32_t hash = HashSlice(key); in Erase()
376 shard_[Shard(hash)].Erase(key, hash); in Erase()