StorageService.h
static void readFile(WorkflowFile *file, std::shared_ptr< FileLocation > location)
Synchronously read a file from the storage service.
Definition: StorageService.cpp:222
std::map< std::string, std::unique_ptr< LogicalFileSystem > > file_systems
File systems.
Definition: StorageService.h:101
virtual std::map< std::string, double > getTotalSpace()
Get the total static capacity of the storage service (in zero simulation time)
Definition: StorageService.cpp:637
virtual std::map< std::string, double > getFreeSpace()
Synchronously asks the storage service for its capacity at all its mount points.
Definition: StorageService.cpp:131
void stop() override
Stop the service.
Definition: StorageService.cpp:111
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
unsigned long buffer_size
The service's buffer size.
Definition: StorageService.h:98
static void initiateFileCopy(std::string answer_mailbox, WorkflowFile *file, std::shared_ptr< FileLocation > src_location, std::shared_ptr< FileLocation > dst_location)
Asynchronously ask for a file copy between two storage services.
Definition: StorageService.cpp:600
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
bool hasMountPoint(std::string mp)
Checked whether the storage service has a particular mount point.
Definition: StorageService.cpp:683
static void deleteFile(WorkflowFile *file, std::shared_ptr< FileLocation > location, std::shared_ptr< FileRegistryService > file_registry_service=nullptr)
Synchronously delete a file at a location.
Definition: StorageService.cpp:475
std::string getMountPoint()
Get the mount point (will throw is more than one)
Definition: StorageService.cpp:649
std::string hostname
The name of the host on which the daemon is running.
Definition: S4U_Daemon.h:51
static void readFiles(std::map< WorkflowFile *, std::shared_ptr< FileLocation >> locations)
Synchronously and sequentially read a set of files from storage services.
Definition: StorageService.cpp:402
static void copyFile(WorkflowFile *file, std::shared_ptr< FileLocation > src_location, std::shared_ptr< FileLocation > dst_location)
Synchronously ask the storage service to read a file from another storage service.
Definition: StorageService.cpp:538
A class that provides basic simulation methods. Once the simulation object has been explicitly or imp...
Definition: Simulation.h:45
static bool lookupFile(WorkflowFile *file, std::shared_ptr< FileLocation > location)
Synchronously asks the storage service whether it holds a file.
Definition: StorageService.cpp:173
bool hasMultipleMountPoints()
Checked whether the storage service has multiple mount points.
Definition: StorageService.cpp:673
StorageService(const std::string &hostname, const std::set< std::string > mount_points, const std::string &service_name, const std::string &data_mailbox_name_prefix)
Constructor.
Definition: StorageService.cpp:39
A file registry service (a.k.a. replica catalog) that holds a database of which files are available a...
Definition: FileRegistryService.h:36
void setScratch()
Indicate that this storace service is a scratch service of a ComputeService.
Definition: StorageService.cpp:73
static void writeFile(WorkflowFile *file, std::shared_ptr< FileLocation > location)
Synchronously write a file to the storage service.
Definition: StorageService.cpp:317
static void stageFile(WorkflowFile *file, std::shared_ptr< FileLocation > location)
Store a file at a particular mount point BEFORE the simulation is launched.
Definition: StorageService.cpp:85
bool isScratch()
Determines whether the storage service is a scratch service of a ComputeService.
Definition: StorageService.cpp:66
static void writeFiles(std::map< WorkflowFile *, std::shared_ptr< FileLocation >> locations)
Synchronously and sequentially upload a set of files from storage services.
Definition: StorageService.cpp:414
Definition: Alarm.cpp:19
std::set< std::string > getMountPoints()
Get the set of mount points.
Definition: StorageService.cpp:661