cache driver implementation.
Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
uint64_t size;
};
-struct Entry {
- std::string key;
- off_t offset;
- uint64_t len;
- int localWeight;
-};
-
class CacheDriver {
public:
CacheDriver() {}
virtual std::string get_attr(const DoutPrefixProvider* dpp, const std::string& key, const std::string& attr_name) = 0;
virtual int set_attr(const DoutPrefixProvider* dpp, const std::string& key, const std::string& attr_name, const std::string& attr_val) = 0;
- /* Entry */
- virtual bool key_exists(const DoutPrefixProvider* dpp, const std::string& key) = 0;
- virtual std::vector<Entry> list_entries(const DoutPrefixProvider* dpp) = 0;
- virtual size_t get_num_entries(const DoutPrefixProvider* dpp) = 0;
-
/* Partition */
virtual Partition get_current_partition_info(const DoutPrefixProvider* dpp) = 0;
virtual uint64_t get_free_space(const DoutPrefixProvider* dpp) = 0;