Lines Matching refs:id
82 bool InsertCache(IdType id, CacheType* cache)
85 auto cacheItem = caches_.find(id);
87 HDF_LOGI("%{public}s: intend to insert a existing cache, SeqNo=%{public}d", __func__, id);
91 HDF_LOGE("%{public}s: Caches is full, new seqNo:%{public}d can't be inserted", __func__, id);
94 caches_[id] = std::move(std::unique_ptr<CacheType>(cache));
97 initFunc_(caches_[id]);
102 bool EraseCache(IdType id)
105 auto cacheItem = caches_.find(id);
118 CacheType* SearchCache(IdType id)
121 auto cacheItem = caches_.find(id);
129 void TravelCaches(std::function<void (IdType id, const CacheType& cache)> func)
198 bool InsertCache(IdType id, Base::NativeBuffer* cache)
201 auto cacheItem = caches_.find(id);
203 HDF_LOGI("%{public}s: intend to insert a existing cache, SeqNo=%{public}d", __func__, id);
207 HDF_LOGE("%{public}s: Caches is full, new seqNo:%{public}d can't be inserted", __func__, id);
210 caches_[id] = OHOS::sptr<Base::NativeBuffer>(cache);
213 initFunc_(caches_[id]);
218 bool EraseCache(IdType id)
221 auto cacheItem = caches_.find(id);
223 HDF_LOGE("%{public}s: Cache %{public}d is not existing\n", __func__, id);
235 Base::NativeBuffer* SearchCache(IdType id)
238 auto cacheItem = caches_.find(id);
246 void TravelCaches(std::function<void (IdType id, const Base::NativeBuffer& cache)> func)