1 #include "storage_interface.hpp"
3 #ifndef STORAGE_N11_HPP_
4 #define STORAGE_N11_HPP_
10 class StorageN11Model;
11 typedef StorageN11Model *StorageN11ModelPtr;
14 typedef StorageN11 *StorageN11Ptr;
17 typedef StorageN11Lmm *StorageN11LmmPtr;
19 class StorageN11Action;
20 typedef StorageN11Action *StorageN11ActionPtr;
22 class StorageN11ActionLmm;
23 typedef StorageN11ActionLmm *StorageN11ActionLmmPtr;
30 class StorageN11Model : public StorageModel {
34 StoragePtr createResource(const char* id, const char* type_id,
35 const char* content_name, const char* content_type, xbt_dict_t properties);
36 double shareResources(double now);
37 void updateActionsState(double now, double delta);
44 class StorageN11Lmm : public StorageLmm {
46 StorageN11Lmm(StorageModelPtr model, const char* name, xbt_dict_t properties,
47 lmm_system_t maxminSystem, double bread, double bwrite, double bconnection,
48 const char* type_id, char *content_name, char *content_type, sg_size_t size);
50 StorageActionPtr open(const char* mount, const char* path);
51 StorageActionPtr close(surf_file_t fd);
52 StorageActionPtr ls(const char *path);
53 xbt_dict_t getContent();
55 StorageActionPtr read(surf_file_t fd, sg_size_t size);//FIXME:why we have a useless param ptr ??
56 StorageActionPtr write(surf_file_t fd, sg_size_t size);//FIXME:why we have a useless param ptr ??
57 void rename(const char *src, const char *dest);
59 lmm_constraint_t p_constraintWrite; /* Constraint for maximum write bandwidth*/
60 lmm_constraint_t p_constraintRead; /* Constraint for maximum write bandwidth*/
67 class StorageN11ActionLmm : public StorageActionLmm {
69 StorageN11ActionLmm() {}; //FIXME:REMOVE
70 StorageN11ActionLmm(ModelPtr model, double cost, bool failed, StorageLmmPtr storage, e_surf_action_storage_type_t type);
74 //FIXME:??void recycle();
77 void setMaxDuration(double duration);
78 void setPriority(double priority);
82 #endif /* STORAGE_N11_HPP_ */