/*
* count bytes we have cached in given range
*/
-bool ObjectCacher::Object::is_cached(loff_t cur, loff_t left)
+bool ObjectCacher::Object::is_cached(loff_t cur, loff_t left) const
{
assert(oc->lock.is_locked());
map<loff_t, BufferHead*>::const_iterator p = data_lower_bound(cur);
put();
}
- bool is_empty() { return data.empty(); }
+ bool is_empty() const { return data.empty(); }
// mid-level
BufferHead *split(BufferHead *bh, loff_t off);
void merge_left(BufferHead *left, BufferHead *right);
void try_merge_bh(BufferHead *bh);
- bool is_cached(loff_t off, loff_t len);
+ bool is_cached(loff_t off, loff_t len) const;
bool include_all_cached_data(loff_t off, loff_t len);
int map_read(ObjectExtent &ex,
map<loff_t, BufferHead*>& hits,