]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rocksdb/table/persistent_cache_helper.h
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / rocksdb / table / persistent_cache_helper.h
index 1db85572966b9f15a88511c67a91ddc73e995ea1..ece339aeec11fe777d4dc5c79aadfcb972c17e2a 100644 (file)
@@ -19,26 +19,28 @@ struct BlockContents;
 // Encapsulates  some of the helper logic for read and writing from the cache
 class PersistentCacheHelper {
  public:
-  // insert block into raw page cache
-  static void InsertRawPage(const PersistentCacheOptions& cache_options,
-                            const BlockHandle& handle, const char* data,
-                            const size_t size);
-
-  // insert block into uncompressed cache
-  static void InsertUncompressedPage(
-      const PersistentCacheOptions& cache_options, const BlockHandle& handle,
-      const BlockContents& contents);
-
-  // lookup block from raw page cacge
-  static Status LookupRawPage(const PersistentCacheOptions& cache_options,
-                              const BlockHandle& handle,
-                              std::unique_ptr<char[]>* raw_data,
-                              const size_t raw_data_size);
-
-  // lookup block from uncompressed cache
-  static Status LookupUncompressedPage(
-      const PersistentCacheOptions& cache_options, const BlockHandle& handle,
-      BlockContents* contents);
+  // Insert block into cache of serialized blocks. Size includes block trailer
+  // (if applicable).
+  static void InsertSerialized(const PersistentCacheOptions& cache_options,
+                               const BlockHandle& handle, const char* data,
+                               const size_t size);
+
+  // Insert block into cache of uncompressed blocks. No block trailer.
+  static void InsertUncompressed(const PersistentCacheOptions& cache_options,
+                                 const BlockHandle& handle,
+                                 const BlockContents& contents);
+
+  // Lookup block from cache of serialized blocks. Size includes block trailer
+  // (if applicable).
+  static Status LookupSerialized(const PersistentCacheOptions& cache_options,
+                                 const BlockHandle& handle,
+                                 std::unique_ptr<char[]>* out_data,
+                                 const size_t expected_data_size);
+
+  // Lookup block from uncompressed cache. No block trailer.
+  static Status LookupUncompressed(const PersistentCacheOptions& cache_options,
+                                   const BlockHandle& handle,
+                                   BlockContents* contents);
 };
 
 }  // namespace ROCKSDB_NAMESPACE