]> git.proxmox.com Git - ceph.git/blame - ceph/src/rocksdb/db/compaction/compaction_picker_universal.h
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / rocksdb / db / compaction / compaction_picker_universal.h
CommitLineData
f67539c2
TL
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//
6// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
7// Use of this source code is governed by a BSD-style license that can be
8// found in the LICENSE file. See the AUTHORS file for names of contributors.
9
10#pragma once
11#ifndef ROCKSDB_LITE
12
13#include "db/compaction/compaction_picker.h"
14
15namespace ROCKSDB_NAMESPACE {
16class UniversalCompactionPicker : public CompactionPicker {
17 public:
1e59de90 18 UniversalCompactionPicker(const ImmutableOptions& ioptions,
f67539c2
TL
19 const InternalKeyComparator* icmp)
20 : CompactionPicker(ioptions, icmp) {}
21 virtual Compaction* PickCompaction(
22 const std::string& cf_name, const MutableCFOptions& mutable_cf_options,
20effc67
TL
23 const MutableDBOptions& mutable_db_options, VersionStorageInfo* vstorage,
24 LogBuffer* log_buffer,
f67539c2
TL
25 SequenceNumber earliest_memtable_seqno = kMaxSequenceNumber) override;
26 virtual int MaxOutputLevel() const override { return NumberLevels() - 1; }
27
28 virtual bool NeedsCompaction(
29 const VersionStorageInfo* vstorage) const override;
30};
31} // namespace ROCKSDB_NAMESPACE
32#endif // !ROCKSDB_LITE