return pimpl_->get_read_bandwidth();
}
+Disk* Disk::set_readwrite_bandwidth(double bw)
+{
+ kernel::actor::simcall([this, bw] { pimpl_->set_readwrite_bandwidth(bw); });
+ return this;
+}
+
double Disk::get_write_bandwidth() const
{
return pimpl_->get_write_bandwidth();
return this;
}
+Disk* Disk::set_state_profile(kernel::profile::Profile* profile)
+{
+ xbt_assert(not pimpl_->is_sealed(), "Cannot set a state profile once the Disk is sealed");
+ kernel::actor::simcall([this, profile]() { this->pimpl_->set_state_profile(profile); });
+ return this;
+}
+
+Disk* Disk::set_read_bandwidth_profile(kernel::profile::Profile* profile)
+{
+ xbt_assert(not pimpl_->is_sealed(), "Cannot set a bandwidth profile once the Disk is sealed");
+ kernel::actor::simcall([this, profile]() { this->pimpl_->set_read_bandwidth_profile(profile); });
+ return this;
+}
+
+Disk* Disk::set_write_bandwidth_profile(kernel::profile::Profile* profile)
+{
+ xbt_assert(not pimpl_->is_sealed(), "Cannot set a bandwidth profile once the Disk is sealed");
+ kernel::actor::simcall([this, profile]() { this->pimpl_->set_write_bandwidth_profile(profile); });
+ return this;
+}
+
IoPtr Disk::io_init(sg_size_t size, Io::OpType type) const
{
return Io::init()->set_disk(this)->set_size(size)->set_op_type(type);
return IoPtr(io_init(size, Io::OpType::WRITE))->vetoable_start()->wait()->get_performed_ioops();
}
+Disk* Disk::set_sharing_policy(Disk::Operation op, Disk::SharingPolicy policy, const NonLinearResourceCb& cb)
+{
+ kernel::actor::simcall([this, op, policy, &cb] { pimpl_->set_sharing_policy(op, policy, cb); });
+ return this;
+}
+
+Disk::SharingPolicy Disk::get_sharing_policy(Operation op) const
+{
+ return this->pimpl_->get_sharing_policy(op);
+}
+
+Disk* Disk::set_factor_cb(const std::function<IoFactorCb>& cb)
+{
+ kernel::actor::simcall([this, &cb] { pimpl_->set_factor_cb(cb); });
+ return this;
+}
+
Disk* Disk::seal()
{
kernel::actor::simcall([this]{ pimpl_->seal(); });