]> git.proxmox.com Git - ceph.git/blame - ceph/src/rocksdb/table/persistent_cache_options.h
update ceph source to reef 18.1.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
1e59de90 9#include "cache/cache_key.h"
7c673cae
FG
10#include "monitoring/statistics.h"
11#include "rocksdb/persistent_cache.h"
12
f67539c2 13namespace ROCKSDB_NAMESPACE {
7c673cae
FG
14
15// PersistentCacheOptions
16//
17// This describe the caching behavior for page cache
18// This is used to pass the context for caching and the cache handle
19struct PersistentCacheOptions {
20 PersistentCacheOptions() {}
21 explicit PersistentCacheOptions(
22 const std::shared_ptr<PersistentCache>& _persistent_cache,
1e59de90 23 const OffsetableCacheKey& _base_cache_key, Statistics* const _statistics)
7c673cae 24 : persistent_cache(_persistent_cache),
1e59de90 25 base_cache_key(_base_cache_key),
7c673cae 26 statistics(_statistics) {}
7c673cae 27 std::shared_ptr<PersistentCache> persistent_cache;
1e59de90 28 OffsetableCacheKey base_cache_key;
7c673cae 29 Statistics* statistics = nullptr;
1e59de90
TL
30
31 static const PersistentCacheOptions kEmpty;
7c673cae
FG
32};
33
f67539c2 34} // namespace ROCKSDB_NAMESPACE