SimGrid
3.21
Versatile Simulation of Distributed Systems
|
Storage represent the disk resources, usually associated to a given host.
By default, SimGrid does not keep track of the actual data being written but only computes the time taken by the corresponding data movement.
#include <Storage.hpp>
Inherits simgrid::xbt::Extendable< Storage >.
Public Member Functions | |
Storage (std::string name, surf::StorageImpl *pimpl) | |
std::string const & | get_name () const |
Retrieves the name of that storage as a C++ string. More... | |
const char * | get_cname () const |
Retrieves the name of that storage as a C string. More... | |
const char * | get_type () |
Host * | get_host () |
void | set_host (Host *host) |
std::unordered_map< std::string, std::string > * | get_properties () |
const char * | get_property (std::string key) |
void | set_property (std::string, std::string value) |
void | set_data (void *data) |
void * | get_data () |
IoPtr | io_init (sg_size_t size, s4u::Io::OpType type) |
IoPtr | read_async (sg_size_t size) |
sg_size_t | read (sg_size_t size) |
IoPtr | write_async (sg_size_t size) |
sg_size_t | write (sg_size_t size) |
surf::StorageImpl * | get_impl () |
Storage * | byName (std::string name) |
std::string const & | getName () const |
const char * | getCname () const |
const char * | getType () |
Host * | getHost () |
std::map< std::string, std::string > * | getProperties () |
const char * | getProperty (const char *key) |
void | setProperty (std::string key, std::string value) |
void | setUserdata (void *data) |
void * | getUserdata () |
![]() | |
Extendable () | |
~Extendable () | |
void * | extension (std::size_t rank) |
U * | extension (Extension< Storage, U > rank) |
U * | extension () |
void | extension_set (std::size_t rank, void *value, bool use_dtor=true) |
void | extension_set (Extension< Storage, U > rank, U *value, bool use_dtor=true) |
void | extension_set (U *p) |
Static Public Member Functions | |
static Storage * | by_name (std::string name) |
Retrieve a Storage by its name. More... | |
static Storage * | by_name_or_null (std::string name) |
![]() | |
static size_t | extension_create (void(*deleter)(void *)) |
static Extension< Storage, U > | extension_create (void(*deleter)(void *)) |
static Extension< Storage, U > | extension_create () |
Static Public Attributes | |
static simgrid::xbt::signal< void(s4u::Storage &)> | on_creation |
Callback signal fired when a new Storage is created. More... | |
static simgrid::xbt::signal< void(s4u::Storage &)> | on_destruction |
Callback signal fired when a Storage is destroyed. More... | |
static simgrid::xbt::signal< void(s4u::Storage &)> | on_state_change |
Callback signal fired when a Storage's state changes. More... | |
Protected Member Functions | |
virtual | ~Storage ()=default |
|
explicit |
|
protectedvirtualdefault |
|
static |
Retrieve a Storage by its name.
It must exist in the platform file
|
static |
|
inline |
Retrieves the name of that storage as a C++ string.
|
inline |
Retrieves the name of that storage as a C string.
const char* simgrid::s4u::Storage::get_type | ( | ) |
|
inline |
|
inline |
std::unordered_map<std::string, std::string>* simgrid::s4u::Storage::get_properties | ( | ) |
const char* simgrid::s4u::Storage::get_property | ( | std::string | key | ) |
void simgrid::s4u::Storage::set_property | ( | std::string | , |
std::string | value | ||
) |
|
inline |
|
inline |
IoPtr simgrid::s4u::Storage::io_init | ( | sg_size_t | size, |
s4u::Io::OpType | type | ||
) |
IoPtr simgrid::s4u::Storage::read_async | ( | sg_size_t | size | ) |
sg_size_t simgrid::s4u::Storage::read | ( | sg_size_t | size | ) |
IoPtr simgrid::s4u::Storage::write_async | ( | sg_size_t | size | ) |
sg_size_t simgrid::s4u::Storage::write | ( | sg_size_t | size | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
Callback signal fired when a new Storage is created.
|
static |
Callback signal fired when a Storage is destroyed.
|
static |
Callback signal fired when a Storage's state changes.