SimGrid
3.21
Versatile Simulation of Distributed Systems
|
I/O Activity, representing the asynchronous disk access.
They are generated from simgrid::s4u::Storage::read() and simgrid::s4u::Storage::write().
#include <Io.hpp>
Inherits simgrid::s4u::Activity.
Public Types | |
enum | OpType { OpType::READ, OpType::WRITE } |
![]() | |
enum | State { State::INITED = 0, State::STARTED, State::CANCELED, State::ERRORED, State::FINISHED } |
Public Member Functions | |
~Io ()=default | |
Io * | start () override |
Starts a previously created activity. More... | |
Io * | wait () override |
Tests whether the given activity is terminated yet. More... | |
Io * | wait_for (double timeout) override |
Blocks until the activity is terminated, or until the timeout is elapsed Raises: timeout exception. More... | |
Io * | cancel () override |
Cancel that activity. More... | |
bool | test () override |
Returns whether this activity is completed. More... | |
double | get_remaining () override |
Get the remaining amount of work that this Activity entails. More... | |
sg_size_t | get_performed_ioops () |
![]() | |
void | wait_until (double time_limit) |
Blocks until the activity is terminated, or until the time limit is reached Raises: timeout exception. More... | |
Activity::State | get_state () |
Retrieve the current state of the activity. More... | |
Activity * | set_remaining (double remains) |
Set the [remaining] amount of work that this Activity will entail. More... | |
Activity * | set_user_data (void *data) |
Put some user data onto the Activity. More... | |
void * | get_user_data () |
Retrieve the user data of the Activity. More... | |
Friends | |
void | intrusive_ptr_release (simgrid::s4u::Io *i) |
void | intrusive_ptr_add_ref (simgrid::s4u::Io *i) |
Additional Inherited Members | |
![]() | |
Activity ()=default | |
virtual | ~Activity ()=default |
|
strong |
|
default |
|
overridevirtual |
Starts a previously created activity.
This function is optional: you can call wait() even if you didn't call start()
Implements simgrid::s4u::Activity.
|
overridevirtual |
Tests whether the given activity is terminated yet.
This is a pure function. Blocks until the activity is terminated
Implements simgrid::s4u::Activity.
|
overridevirtual |
Blocks until the activity is terminated, or until the timeout is elapsed Raises: timeout exception.
Implements simgrid::s4u::Activity.
|
overridevirtual |
Cancel that activity.
Implements simgrid::s4u::Activity.
|
overridevirtual |
Returns whether this activity is completed.
Implements simgrid::s4u::Activity.
|
overridevirtual |
Get the remaining amount of work that this Activity entails.
When it's 0, it's done.
Reimplemented from simgrid::s4u::Activity.
sg_size_t simgrid::s4u::Io::get_performed_ioops | ( | ) |
|
friend |
|
friend |