Make Cache::GetCapacity constant

Summary: This will allow us to access constant via `DB::GetOptions().table_cache.GetCapacity()` or `DB::GetOptions().block_cache.GetCapacity()` since GetOptions() is also constant method.
This commit is contained in:
kailiu 2013-12-10 17:34:35 -08:00
parent 3a7c5bd40a
commit c79e595471
2 changed files with 2 additions and 2 deletions

View file

@ -102,7 +102,7 @@ class Cache {
virtual uint64_t NewId() = 0;
// returns the maximum configured capacity of the cache
virtual size_t GetCapacity() = 0;
virtual size_t GetCapacity() const = 0;
private:
void LRU_Remove(Handle* e);

View file

@ -404,7 +404,7 @@ class ShardedLRUCache : public Cache {
MutexLock l(&id_mutex_);
return ++(last_id_);
}
virtual size_t GetCapacity() {
virtual size_t GetCapacity() const {
return capacity_;
}
};