Only implemented for rocksdb for now.
Signed-off-by: Samuel Just <sjust@redhat.com>
virtual PerfCounters *get_perf_counters() {
return nullptr;
}
+
+ /**
+ * Access implementation specific integral property corresponding
+ * to passed property and prefic.
+ * Return value is true if property is valid for prefix, populates out.
+ */
+ virtual bool get_property(
+ const std::string &property,
+ uint64_t *out) {
+ return false;
+ }
protected:
/// List of matching prefixes/ColumnFamilies and merge operators
std::vector<std::pair<std::string,
}
}
+bool RocksDBStore::get_property(
+ const std::string &property,
+ uint64_t *out)
+{
+ return db->GetIntProperty(property, out);
+}
+
int64_t RocksDBStore::estimate_prefix_size(const string& prefix,
const string& key_prefix)
{
return logger;
}
+ bool get_property(
+ const std::string &property,
+ uint64_t *out) final;
+
int64_t estimate_prefix_size(const string& prefix,
const string& key_prefix) override;