Lines Matching refs:CacheHandle

177 struct CacheHandle {  struct
194 CacheHandle() = default;
196 CacheHandle(const CacheHandle& a) { *this = a; } in CacheHandle() argument
198 CacheHandle(const Slice& k, void* v, Deleter* del) in CacheHandle() argument
201 CacheHandle& operator=(const CacheHandle& a) { in operator =() argument
214 meta_charge += sizeof(CacheHandle); in CalcTotalCharge()
254 autovector<CacheHandle> to_delete_value;
264 typedef tbb::concurrent_hash_map<CacheKey, CacheHandle*, CacheKey> HashTable;
308 bool Unref(CacheHandle* handle, bool set_usage, CleanupContext* context);
315 bool UnsetInCache(CacheHandle* handle, CleanupContext* context);
322 void RecycleHandle(CacheHandle* handle, CleanupContext* context);
333 bool TryEvict(CacheHandle* value, CleanupContext* context);
342 CacheHandle* Insert(const Slice& key, uint32_t hash, void* value,
358 std::deque<CacheHandle> list_;
365 autovector<CacheHandle*> recycle_;
424 void ClockCacheShard::RecycleHandle(CacheHandle* handle, in RecycleHandle()
439 for (const CacheHandle& handle : context.to_delete_value) { in Cleanup()
450 auto handle = reinterpret_cast<CacheHandle*>(h); in Ref()
470 bool ClockCacheShard::Unref(CacheHandle* handle, bool set_usage, in Unref()
493 bool ClockCacheShard::UnsetInCache(CacheHandle* handle, in UnsetInCache()
508 bool ClockCacheShard::TryEvict(CacheHandle* handle, CleanupContext* context) { in TryEvict()
564 CacheHandle* ClockCacheShard::Insert(const Slice& key, uint32_t hash, in Insert()
569 CacheHandle::CalcTotalCharge(key, charge, metadata_charge_policy_); in Insert()
582 CacheHandle* handle = nullptr; in Insert()
600 CacheHandle* existing_handle = accessor->second; in Insert()
621 CacheHandle* handle = Insert(key_copy, hash, value, charge, deleter, in Insert()
640 CacheHandle* handle = accessor->second; in Lookup()
662 CacheHandle* handle = reinterpret_cast<CacheHandle*>(h); in Release()
683 CacheHandle* handle = accessor->second; in EraseAndConfirm()
729 return reinterpret_cast<const CacheHandle*>(handle)->value; in Value()
733 return reinterpret_cast<const CacheHandle*>(handle)->charge; in GetCharge()
737 return reinterpret_cast<const CacheHandle*>(handle)->hash; in GetHash()