]> git.proxmox.com Git - ceph.git/blame - ceph/src/rocksdb/table/persistent_cache_options.h
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / rocksdb / table / persistent_cache_options.h
CommitLineData
7c673cae 1// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
11fdf7f2
TL
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).
7c673cae
FG
5#pragma once
6
7#include <string>
8
9#include "monitoring/statistics.h"
10#include "rocksdb/persistent_cache.h"
11
f67539c2 12namespace ROCKSDB_NAMESPACE {
7c673cae
FG
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
18struct 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
f67539c2 34} // namespace ROCKSDB_NAMESPACE