11 #ifndef WRENCH_STORAGESERVICE_H 12 #define WRENCH_STORAGESERVICE_H 18 #include <wrench/services/Service.h> 19 #include <wrench/workflow/execution_events/FailureCause.h> 20 #include <wrench/services/file_registry/FileRegistryService.h> 21 #include <wrench/workflow/job/StandardJob.h> 22 #include <wrench/services/storage/storage_helpers/LogicalFileSystem.h> 23 #include <wrench/services/storage/storage_helpers/FileLocation.h> 31 class FileRegistryService;
47 virtual std::map<std::string, double> getFreeSpace();
49 virtual std::map<std::string, double> getTotalSpace();
51 std::string getMountPoint();
52 std::set<std::string> getMountPoints();
53 bool hasMultipleMountPoints();
54 bool hasMountPoint(std::string mp);
56 static bool lookupFile(
WorkflowFile *file, std::shared_ptr<FileLocation> location);
57 static void deleteFile(
WorkflowFile *file, std::shared_ptr<FileLocation> location,
58 std::shared_ptr<FileRegistryService> file_registry_service =
nullptr);
59 static void readFile(
WorkflowFile *file, std::shared_ptr<FileLocation> location);
60 static void writeFile(
WorkflowFile *file, std::shared_ptr<FileLocation> location);
70 std::shared_ptr<FileLocation> src_location,
71 std::shared_ptr<FileLocation> dst_location);
74 static void initiateFileCopy(std::string answer_mailbox,
76 std::shared_ptr<FileLocation> src_location,
77 std::shared_ptr<FileLocation> dst_location);
79 static void readFiles(std::map<
WorkflowFile *, std::shared_ptr<FileLocation>> locations);
81 static void writeFiles(std::map<
WorkflowFile *, std::shared_ptr<FileLocation>> locations);
85 const std::set<std::string> mount_points,
86 const std::string &service_name,
87 const std::string &data_mailbox_name_prefix);
95 static void stageFile(
WorkflowFile *file , std::shared_ptr<FileLocation> location);
98 unsigned long buffer_size;
101 std::map<std::string, std::unique_ptr<LogicalFileSystem>> file_systems;
116 static void writeOrReadFiles(FileOperation action,
117 std::map<
WorkflowFile *, std::shared_ptr<FileLocation>> locations);
119 void stageFile(
WorkflowFile *file , std::string mountpoint, std::string directory);
133 #endif //WRENCH_STORAGESERVICE_H A service that can be added to the simulation and that can be used by a WMS when executing a workflow...
Definition: Service.h:26
A helper class that implements the concept of a communication thread that performs a file transfer...
Definition: FileTransferThread.h:26
A data file used/produced by a WorkflowTask in a Workflow.
Definition: WorkflowFile.h:26
A class that provides basic simulation methods. Once the simulation object has been explicitly or imp...
Definition: Simulation.h:45
A file registry service (a.k.a. replica catalog) that holds a database of which files are available a...
Definition: FileRegistryService.h:36
The storage service base class.
Definition: StorageService.h:36