StorageService.h
55 virtual void deleteFile(WorkflowFile *file, std::string dst_dir, FileRegistryService *file_registry_service=nullptr);
66 virtual void deleteFile(WorkflowFile *file, WorkflowJob* job, FileRegistryService *file_registry_service=nullptr);
70 virtual void copyFile(WorkflowFile *file, StorageService *src, std::string src_dir, std::string dst_dir);
74 virtual void copyFile(WorkflowFile *file, StorageService *src, WorkflowJob* src_job, WorkflowJob* dst_job);
86 virtual void initiateFileRead(std::string mailbox_that_should_receive_file_content, WorkflowFile *file, std::string src_dir);
static void deleteFiles(std::set< WorkflowFile *> files, std::map< WorkflowFile *, StorageService *> file_locations, StorageService *default_storage_service)
Synchronously and sequentially delete a set of files from storage services.
Definition: StorageService.cpp:749
virtual void copyFile(WorkflowFile *file, StorageService *src, std::string src_dir, std::string dst_dir)
Synchronously ask the storage service to read a file from another storage service.
Definition: StorageService.cpp:859
virtual void readFile(WorkflowFile *file, std::string src_dir)
Synchronously read a file from the storage service.
Definition: StorageService.cpp:317
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
static void readFiles(std::set< WorkflowFile *> files, std::map< WorkflowFile *, StorageService *> file_locations, StorageService *default_storage_service, std::set< WorkflowFile *> &files_in_scratch, WorkflowJob *job=nullptr)
Synchronously and sequentially read a set of files from storage services.
Definition: StorageService.cpp:494
Abstraction of a job used for executing tasks in a Workflow.
Definition: WorkflowJob.h:31
A data file used/produced by a WorkflowTask in a Workflow.
Definition: WorkflowFile.h:26
virtual bool lookupFile(WorkflowFile *file)
Synchronously asks the storage service whether it holds a file.
Definition: StorageService.cpp:176
std::string hostname
The name of the host on which the daemon is running.
Definition: S4U_Daemon.h:47
virtual void initiateFileCopy(std::string answer_mailbox, WorkflowFile *file, StorageService *src, std::string src_dir, std::string dst_dir)
Asynchronously ask the storage service to read a file from another storage service.
Definition: StorageService.cpp:926
virtual void writeFile(WorkflowFile *file, std::string dst_dir)
Synchronously write a file to the storage service.
Definition: StorageService.cpp:424
virtual void initiateFileRead(std::string mailbox_that_should_receive_file_content, WorkflowFile *file, std::string src_dir)
Asynchronously read a file from the storage service.
Definition: StorageService.cpp:982
void stageFile(WorkflowFile *)
Store a file on the storage service BEFORE the simulation is launched.
Definition: StorageService.cpp:51
double occupied_space
The storage service's occupied space.
Definition: StorageService.h:129
void removeFileFromStorage(WorkflowFile *, std::string)
Remove a file from storage (internal method)
Definition: StorageService.cpp:85
static void writeFiles(std::set< WorkflowFile *> files, std::map< WorkflowFile *, StorageService *> file_locations, StorageService *default_storage_service, std::set< WorkflowFile *> &files_in_scratch, WorkflowJob *job=nullptr)
Synchronously and sequentially upload a set of files from storage services.
Definition: StorageService.cpp:522
virtual double getFreeSpace()
Synchronously asks the storage service for its capacity.
Definition: StorageService.cpp:134
A file registry service (a.k.a. replica catalog) that holds a database of which files are available a...
Definition: FileRegistryService.h:33
double getTotalSpace()
Get the total static capacity of the storage service (in zero simulation time)
Definition: StorageService.cpp:1046
double capacity
The storage service's capacity.
Definition: StorageService.h:127
std::map< std::string, std::set< WorkflowFile * > > stored_files
The map of file directories and the set of files stored on those directories inside the storage servi...
Definition: StorageService.h:125
Definition: TerminalOutput.cpp:15
virtual void deleteFile(WorkflowFile *file, FileRegistryService *file_registry_service=nullptr)
Synchronously asks the storage service to delete a file copy.
Definition: StorageService.cpp:638
StorageService(const std::string &hostname, const std::string &service_name, const std::string &data_mailbox_name_prefix, double capacity)
Constructor.
Definition: StorageService.cpp:31