public:
#ifndef DOXYGEN
- explicit Disk(kernel::resource::DiskImpl* pimpl) : pimpl_(pimpl) {}
+ explicit Disk(const std::string& name, kernel::resource::DiskImpl* pimpl) : pimpl_(pimpl), name_(name) {}
#endif
/** @brief Callback signal fired when a new Disk is created */
const std::unordered_map<std::string, std::string>* get_properties() const;
const char* get_property(const std::string& key) const;
- void set_property(const std::string&, const std::string& value);
+ Disk* set_property(const std::string&, const std::string& value);
+ Disk* set_properties(const std::unordered_map<std::string, std::string>& properties);
+ Disk* set_host(Host* host);
Host* get_host() const;
- IoPtr io_init(sg_size_t size, s4u::Io::OpType type);
+ IoPtr io_init(sg_size_t size, s4u::Io::OpType type) const;
- IoPtr read_async(sg_size_t size);
- sg_size_t read(sg_size_t size);
+ IoPtr read_async(sg_size_t size) const;
+ sg_size_t read(sg_size_t size) const;
+
+ IoPtr write_async(sg_size_t size) const;
+ sg_size_t write(sg_size_t size) const;
+ Disk* seal();
- IoPtr write_async(sg_size_t size);
- sg_size_t write(sg_size_t size);
#ifndef DOXYGEN
kernel::resource::DiskImpl* get_impl() const { return pimpl_; }
#endif