]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rocksdb/table/cuckoo/cuckoo_table_factory.h
import quincy beta 17.1.0
[ceph.git] / ceph / src / rocksdb / table / cuckoo / cuckoo_table_factory.h
index 1b5b6c20066cf236de8224b692141b4080734b99..429ad23d2202b3eea8a3895399a6f906163785f2 100644 (file)
@@ -52,14 +52,17 @@ static inline uint64_t CuckooHash(
 // - Does not support prefix bloom filters.
 class CuckooTableFactory : public TableFactory {
  public:
-  explicit CuckooTableFactory(const CuckooTableOptions& table_options)
-    : table_options_(table_options) {}
+  explicit CuckooTableFactory(
+      const CuckooTableOptions& table_option = CuckooTableOptions());
   ~CuckooTableFactory() {}
 
-  const char* Name() const override { return "CuckooTable"; }
+  // Method to allow CheckedCast to work for this class
+  static const char* kClassName() { return kCuckooTableName(); }
+  const char* Name() const override { return kCuckooTableName(); }
 
+  using TableFactory::NewTableReader;
   Status NewTableReader(
-      const TableReaderOptions& table_reader_options,
+      const ReadOptions& ro, const TableReaderOptions& table_reader_options,
       std::unique_ptr<RandomAccessFileReader>&& file, uint64_t file_size,
       std::unique_ptr<TableReader>* table,
       bool prefetch_index_and_filter_in_cache = true) const override;
@@ -68,21 +71,7 @@ class CuckooTableFactory : public TableFactory {
       const TableBuilderOptions& table_builder_options,
       uint32_t column_family_id, WritableFileWriter* file) const override;
 
-  // Sanitizes the specified DB Options.
-  Status SanitizeOptions(
-      const DBOptions& /*db_opts*/,
-      const ColumnFamilyOptions& /*cf_opts*/) const override {
-    return Status::OK();
-  }
-
-  std::string GetPrintableTableOptions() const override;
-
-  void* GetOptions() override { return &table_options_; }
-
-  Status GetOptionString(std::string* /*opt_string*/,
-                         const std::string& /*delimiter*/) const override {
-    return Status::OK();
-  }
+  std::string GetPrintableOptions() const override;
 
  private:
   CuckooTableOptions table_options_;