
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 · 591 阅读 · 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 · 319 阅读 · 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 · 294 阅读 · 0 评论