1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
2 // This source code is licensed under both the GPLv2 (found in the
3 // COPYING file in the root directory) and Apache 2.0 License
4 // (found in the LICENSE.Apache file in the root directory).
5 // Copyright (c) 2011 The LevelDB Authors. All rights reserved.
6 // Use of this source code is governed by a BSD-style license that can be
7 // found in the LICENSE file. See the AUTHORS file for names of contributors.
11 #include "rocksdb/slice_transform.h"
12 #include "rocksdb/memtablerep.h"
14 namespace ROCKSDB_NAMESPACE
{
16 class HashSkipListRepFactory
: public MemTableRepFactory
{
18 explicit HashSkipListRepFactory(
20 int32_t skiplist_height
,
21 int32_t skiplist_branching_factor
)
22 : bucket_count_(bucket_count
),
23 skiplist_height_(skiplist_height
),
24 skiplist_branching_factor_(skiplist_branching_factor
) { }
26 virtual ~HashSkipListRepFactory() {}
28 using MemTableRepFactory::CreateMemTableRep
;
29 virtual MemTableRep
* CreateMemTableRep(
30 const MemTableRep::KeyComparator
& compare
, Allocator
* allocator
,
31 const SliceTransform
* transform
, Logger
* logger
) override
;
33 virtual const char* Name() const override
{
34 return "HashSkipListRepFactory";
38 const size_t bucket_count_
;
39 const int32_t skiplist_height_
;
40 const int32_t skiplist_branching_factor_
;
43 } // namespace ROCKSDB_NAMESPACE
44 #endif // ROCKSDB_LITE