SimGrid  3.16
Versatile Simulation of Distributed Systems
Storage Management Functions

Detailed Description

Storage structure of MSG (msg_storage_t) and associated functions, inspired from POSIX.

(msg_storage_t) and the functions for managing it.

Typedefs

typedef sg_storage_t msg_storage_t
 Storage datatype. More...
 
typedef sg_storage_t msg_storage_t
 Storage datatype. More...
 

Functions

const char * MSG_storage_get_name (msg_storage_t storage)
 Returns the name of the msg_storage_t. More...
 
sg_size_t MSG_storage_get_free_size (msg_storage_t storage)
 Returns the free space size of a storage element. More...
 
sg_size_t MSG_storage_get_used_size (msg_storage_t storage)
 Returns the used space size of a storage element. More...
 
xbt_dict_t MSG_storage_get_properties (msg_storage_t storage)
 Returns a xbt_dict_t consisting of the list of properties assigned to this storage. More...
 
void MSG_storage_set_property_value (msg_storage_t storage, const char *name, char *value)
 Change the value of a given storage property. More...
 
msg_storage_t MSG_storage_get_by_name (const char *name)
 Finds a msg_storage_t using its name. More...
 
xbt_dynar_t MSG_storages_as_dynar ()
 Returns a dynar containing all the storage elements declared at a given point of time. More...
 
msg_error_t MSG_storage_set_data (msg_storage_t storage, void *data)
 Set the user data of a msg_storage_t. More...
 
xbt_dict_t MSG_storage_get_content (msg_storage_t storage)
 Returns the content (file list) of a msg_storage_t. More...
 
sg_size_t MSG_storage_get_size (msg_storage_t storage)
 Returns the size of a msg_storage_t. More...
 
const char * MSG_storage_get_host (msg_storage_t storage)
 Returns the host name the storage is attached to. More...
 

Typedef Documentation

◆ msg_storage_t [1/2]

Storage datatype.

You should consider this as an opaque object.

◆ msg_storage_t [2/2]

Storage datatype.

You should consider this as an opaque object.

Function Documentation

◆ MSG_storage_get_name()

const char* MSG_storage_get_name ( msg_storage_t  storage)

Returns the name of the msg_storage_t.

This functions checks whether a storage is a valid pointer or not and return its name.

◆ MSG_storage_get_free_size()

sg_size_t MSG_storage_get_free_size ( msg_storage_t  storage)

Returns the free space size of a storage element.

Parameters
storagea storage
Returns
the free space size of the storage element (as a sg_size_t)

◆ MSG_storage_get_used_size()

sg_size_t MSG_storage_get_used_size ( msg_storage_t  storage)

Returns the used space size of a storage element.

Parameters
storagea storage
Returns
the used space size of the storage element (as a sg_size_t)

◆ MSG_storage_get_properties()

xbt_dict_t MSG_storage_get_properties ( msg_storage_t  storage)

Returns a xbt_dict_t consisting of the list of properties assigned to this storage.

Parameters
storagea storage
Returns
a dict containing the properties

◆ MSG_storage_set_property_value()

void MSG_storage_set_property_value ( msg_storage_t  storage,
const char *  name,
char *  value 
)

Change the value of a given storage property.

Parameters
storagea storage
namea property name
valuewhat to change the property to

◆ MSG_storage_get_by_name()

msg_storage_t MSG_storage_get_by_name ( const char *  name)

Finds a msg_storage_t using its name.

Parameters
namethe name of a storage
Returns
the corresponding storage

◆ MSG_storages_as_dynar()

xbt_dynar_t MSG_storages_as_dynar ( )

Returns a dynar containing all the storage elements declared at a given point of time.

◆ MSG_storage_set_data()

msg_error_t MSG_storage_set_data ( msg_storage_t  storage,
void data 
)

Set the user data of a msg_storage_t.

This functions attach data to storage if possible.

◆ MSG_storage_get_content()

xbt_dict_t MSG_storage_get_content ( msg_storage_t  storage)

Returns the content (file list) of a msg_storage_t.

Parameters
storagea storage
Returns
The content of this storage element as a dict (full path file => size)

◆ MSG_storage_get_size()

sg_size_t MSG_storage_get_size ( msg_storage_t  storage)

Returns the size of a msg_storage_t.

Parameters
storagea storage
Returns
The size of the storage

◆ MSG_storage_get_host()

const char* MSG_storage_get_host ( msg_storage_t  storage)

Returns the host name the storage is attached to.

This functions checks whether a storage is a valid pointer or not and return its name.