1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
2 // This source code is licensed under the BSD-style license found in the
3 // LICENSE file in the root directory of this source tree. An additional grant
4 // of patent rights can be found in the PATENTS file in the same 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"
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 virtual MemTableRep
* CreateMemTableRep(
29 const MemTableRep::KeyComparator
& compare
, MemTableAllocator
* allocator
,
30 const SliceTransform
* transform
, Logger
* logger
) override
;
32 virtual const char* Name() const override
{
33 return "HashSkipListRepFactory";
37 const size_t bucket_count_
;
38 const int32_t skiplist_height_
;
39 const int32_t skiplist_branching_factor_
;
43 #endif // ROCKSDB_LITE