fork of https://github.com/oxigraph/rocksdb and https://github.com/facebook/rocksdb for nextgraph and oxigraph
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.8 KiB
49 lines
1.8 KiB
11 years ago
|
// Copyright (c) 2013, Facebook, Inc. All rights reserved.
|
||
|
// This source code is licensed under the BSD-style license found in the
|
||
|
// LICENSE file in the root directory of this source tree. An additional grant
|
||
|
// of patent rights can be found in the PATENTS file in the same directory.
|
||
|
// 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 AUTHORS file for names of contributors.
|
||
|
|
||
|
#pragma once
|
||
9 years ago
|
#ifndef ROCKSDB_LITE
|
||
11 years ago
|
#include "rocksdb/slice_transform.h"
|
||
|
#include "rocksdb/memtablerep.h"
|
||
|
|
||
|
namespace rocksdb {
|
||
|
|
||
|
class HashLinkListRepFactory : public MemTableRepFactory {
|
||
|
public:
|
||
11 years ago
|
explicit HashLinkListRepFactory(size_t bucket_count,
|
||
10 years ago
|
uint32_t threshold_use_skiplist,
|
||
11 years ago
|
size_t huge_page_tlb_size,
|
||
|
int bucket_entries_logging_threshold,
|
||
|
bool if_log_bucket_dist_when_flash)
|
||
|
: bucket_count_(bucket_count),
|
||
10 years ago
|
threshold_use_skiplist_(threshold_use_skiplist),
|
||
11 years ago
|
huge_page_tlb_size_(huge_page_tlb_size),
|
||
|
bucket_entries_logging_threshold_(bucket_entries_logging_threshold),
|
||
|
if_log_bucket_dist_when_flash_(if_log_bucket_dist_when_flash) {}
|
||
11 years ago
|
|
||
11 years ago
|
virtual ~HashLinkListRepFactory() {}
|
||
11 years ago
|
|
||
11 years ago
|
virtual MemTableRep* CreateMemTableRep(
|
||
10 years ago
|
const MemTableRep::KeyComparator& compare, MemTableAllocator* allocator,
|
||
11 years ago
|
const SliceTransform* transform, Logger* logger) override;
|
||
11 years ago
|
|
||
|
virtual const char* Name() const override {
|
||
|
return "HashLinkListRepFactory";
|
||
|
}
|
||
|
|
||
|
private:
|
||
|
const size_t bucket_count_;
|
||
10 years ago
|
const uint32_t threshold_use_skiplist_;
|
||
11 years ago
|
const size_t huge_page_tlb_size_;
|
||
11 years ago
|
int bucket_entries_logging_threshold_;
|
||
|
bool if_log_bucket_dist_when_flash_;
|
||
11 years ago
|
};
|
||
|
|
||
|
}
|
||
11 years ago
|
#endif // ROCKSDB_LITE
|