]> git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/table/persistent_cache_options.h
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / rocksdb / table / persistent_cache_options.h
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 #pragma once
6
7 #include <string>
8
9 #include "monitoring/statistics.h"
10 #include "rocksdb/persistent_cache.h"
11
12 namespace rocksdb {
13
14 // PersistentCacheOptions
15 //
16 // This describe the caching behavior for page cache
17 // This is used to pass the context for caching and the cache handle
18 struct PersistentCacheOptions {
19 PersistentCacheOptions() {}
20 explicit PersistentCacheOptions(
21 const std::shared_ptr<PersistentCache>& _persistent_cache,
22 const std::string _key_prefix, Statistics* const _statistics)
23 : persistent_cache(_persistent_cache),
24 key_prefix(_key_prefix),
25 statistics(_statistics) {}
26
27 virtual ~PersistentCacheOptions() {}
28
29 std::shared_ptr<PersistentCache> persistent_cache;
30 std::string key_prefix;
31 Statistics* statistics = nullptr;
32 };
33
34 } // namespace rocksdb