SimGrid  3.14.159
Versatile Simulation of Distributed Systems
simgrid::surf::StorageN11 Class Reference

#include <storage_n11.hpp>

Inheritance diagram for simgrid::surf::StorageN11:
simgrid::surf::Storage simgrid::surf::Resource simgrid::surf::PropertyHolder

Public Member Functions

 StorageN11 (StorageModel *model, const char *name, lmm_system_t maxminSystem, double bread, double bwrite, double bconnection, const char *type_id, char *content_name, const char *content_type, sg_size_t size, char *attach)
 
StorageActionopen (const char *mount, const char *path)
 Open a file. More...
 
StorageActionclose (surf_file_t fd)
 Close a file. More...
 
StorageActionls (const char *path)
 
StorageActionread (surf_file_t fd, sg_size_t size)
 Read a file. More...
 
StorageActionwrite (surf_file_t fd, sg_size_t size)
 Write a file. More...
 
void rename (const char *src, const char *dest)
 
- Public Member Functions inherited from simgrid::surf::Storage
 Storage (Model *model, const char *name, lmm_system_t maxminSystem, double bread, double bwrite, double bconnection, const char *type_id, const char *content_name, const char *content_type, sg_size_t size, const char *attach)
 Storage constructor. More...
 
 ~Storage ()
 
bool isUsed () override
 Check if the Storage is used (if an action currently uses its resources) More...
 
void apply_event (tmgr_trace_iterator_t event, double value) override
 Apply an event of external load event to that resource. More...
 
void turnOn () override
 Turn on the current Resource. More...
 
void turnOff () override
 Turn off the current Resource. More...
 
virtual xbt_dict_t getContent ()
 Get the content of the current Storage. More...
 
virtual sg_size_t getSize ()
 Get the size in bytes of the current Storage. More...
 
virtual sg_size_t getFreeSize ()
 Get the available size in bytes of the current Storage. More...
 
virtual sg_size_t getUsedSize ()
 Get the used size in bytes of the current Storage. More...
 
xbt_dict_t parseContent (const char *filename)
 
- Public Member Functions inherited from simgrid::surf::Resource
 Resource (Model *model, const char *name, lmm_constraint_t constraint)
 Constructor of LMM Resources. More...
 
virtual ~Resource ()
 
ModelgetModel () const
 Get the Model of the current Resource. More...
 
const char * getName () const
 Get the name of the current Resource. More...
 
bool operator== (const Resource &other) const
 
virtual bool isOn () const
 Check if the current Resource is active. More...
 
virtual bool isOff () const
 Check if the current Resource is shut down. More...
 
lmm_constraint_t getConstraint () const
 Get the lmm constraint associated to this Resource if it is part of a LMM component (or null if none) More...
 
- Public Member Functions inherited from simgrid::surf::PropertyHolder
 PropertyHolder ()
 
 ~PropertyHolder ()
 
const char * getProperty (const char *id)
 Return the property associated to the provided key (or nullptr if not existing) More...
 
void setProperty (const char *id, const char *value)
 Change the value of a given key in the property set. More...
 
xbt_dict_t getProperties ()
 Return the whole set of properties. More...
 

Additional Inherited Members

- Public Attributes inherited from simgrid::surf::Storage
xbt_dict_t content_
 
char * contentType_
 
sg_size_t size_
 
sg_size_t usedSize_
 
char * typeId_
 
char * attach_
 
std::vector< StorageAction * > writeActions_
 
lmm_constraint_t constraintWrite_
 
lmm_constraint_t constraintRead_
 
- Protected Attributes inherited from simgrid::surf::Resource
const lmm_constraint_t constraint_ = nullptr
 

Constructor & Destructor Documentation

◆ StorageN11()

simgrid::surf::StorageN11::StorageN11 ( StorageModel model,
const char *  name,
lmm_system_t  maxminSystem,
double  bread,
double  bwrite,
double  bconnection,
const char *  type_id,
char *  content_name,
const char *  content_type,
sg_size_t  size,
char *  attach 
)

Member Function Documentation

◆ open()

StorageAction * simgrid::surf::StorageN11::open ( const char *  mount,
const char *  path 
)
virtual

Open a file.

Parameters
mountThe mount point
pathThe path to the file
Returns
The StorageAction corresponding to the opening

Implements simgrid::surf::Storage.

◆ close()

StorageAction * simgrid::surf::StorageN11::close ( surf_file_t  fd)
virtual

Close a file.

Parameters
fdThe file descriptor to close
Returns
The StorageAction corresponding to the closing

Implements simgrid::surf::Storage.

◆ ls()

StorageAction* simgrid::surf::StorageN11::ls ( const char *  path)

◆ read()

StorageAction * simgrid::surf::StorageN11::read ( surf_file_t  fd,
sg_size_t  size 
)
virtual

Read a file.

Parameters
fdThe file descriptor to read
sizeThe size in bytes to read
Returns
The StorageAction corresponding to the reading

Implements simgrid::surf::Storage.

◆ write()

StorageAction * simgrid::surf::StorageN11::write ( surf_file_t  fd,
sg_size_t  size 
)
virtual

Write a file.

Parameters
fdThe file descriptor to write
sizeThe size in bytes to write
Returns
The StorageAction corresponding to the writing

Implements simgrid::surf::Storage.

◆ rename()

void simgrid::surf::StorageN11::rename ( const char *  src,
const char *  dest 
)

The documentation for this class was generated from the following files: