![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LevelDB
lingedeng
海纳百川有容乃大,壁立千仞无欲则刚!
展开
-
LevelDB之Cache之HandleTable
HandleTalbe::HandleTable() LRUHandle* HandleTalbe::Insert(LRUHandle* h) 1. 插入元素 情况1:对于原始的HandleTable中没有元素 情况2:对于待插入的HandleTable中通过FindPointer找到具有相同的key或hash的节点 2. 扩容,重新计算hash并调整节点 插入...原创 2018-08-31 15:39:16 · 545 阅读 · 0 评论 -
LevelDB之Cache代码
LevelDB license: // Copyright (c) 2011 The LevelDB Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. See the AUTHOR...翻译 2018-08-31 16:00:10 · 287 阅读 · 0 评论 -
LevelDB之Skiplist
#ifndef SKIPLIST_H_ #define SKIPLIST_H_ #include <ctime> #include <cstdlib> #include <iostream> #include <fstream> /* 简单跳跃表,它允许简单的插入和删除元素,并提供O(logn)的查询时间复杂度。 */ /* SkipL...原创 2018-08-31 16:36:52 · 256 阅读 · 0 评论