MiniOB 1
MiniOB is one mini database, helping developers to learn how database works.
|
类 | |
class | ListNode |
class | PListNodeHasher |
class | PListNodePredicator |
Public 成员函数 | |
LruCache (size_t reserve=0) | |
void | destroy () |
size_t | count () const |
bool | get (const Key &key, Value &value) |
void | put (const Key &key, const Value &value) |
void | remove (const Key &key) |
void | pop (Value *&value) |
void | foreach (function< bool(const Key &, const Value &)> func) |
void | foreach_reverse (function< bool(const Key &, const Value &)> func) |
Private 类型 | |
using | SearchType = unordered_set< ListNode *, PListNodeHasher, PListNodePredicator > |
Private 成员函数 | |
void | lru_touch (ListNode *node) |
void | lru_push (ListNode *node) |
void | lru_remove (ListNode *node) |
Private 属性 | |
SearchType | searcher_ |
ListNode * | lru_front_ = nullptr |
ListNode * | lru_tail_ = nullptr |