#include "db/table_cache.h"
#include "db/filename.h"
#include "leveldb/env.h"
#include "leveldb/table.h"
#include "util/coding.h"
namespace leveldb {
struct TableAndFile { … };
static void DeleteEntry(const Slice& key, void* value) { … }
static void UnrefEntry(void* arg1, void* arg2) { … }
TableCache::TableCache(const std::string& dbname, const Options& options,
int entries)
: … { … }
TableCache::~TableCache() { … }
Status TableCache::FindTable(uint64_t file_number, uint64_t file_size,
Cache::Handle** handle) { … }
Iterator* TableCache::NewIterator(const ReadOptions& options,
uint64_t file_number, uint64_t file_size,
Table** tableptr) { … }
Status TableCache::Get(const ReadOptions& options, uint64_t file_number,
uint64_t file_size, const Slice& k, void* arg,
void (*handle_result)(void*, const Slice&,
const Slice&)) { … }
void TableCache::Evict(uint64_t file_number) { … }
}