]>
git.proxmox.com Git - ceph.git/blob - 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).
9 #include "monitoring/statistics.h"
10 #include "rocksdb/persistent_cache.h"
14 // PersistentCacheOptions
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
) {}
27 virtual ~PersistentCacheOptions() {}
29 std::shared_ptr
<PersistentCache
> persistent_cache
;
30 std::string key_prefix
;
31 Statistics
* statistics
= nullptr;
34 } // namespace rocksdb