11 #ifndef WRENCH_DATAMOVEMENTMANAGER_H
12 #define WRENCH_DATAMOVEMENTMANAGER_H
15 #include "wrench/simgrid_S4U_util/S4U_Daemon.h"
40 std::shared_ptr<FileLocation> src,
41 std::shared_ptr<FileLocation> dst,
42 std::shared_ptr<FileRegistryService> file_registry_service=
nullptr);
45 std::shared_ptr<FileLocation> src,
46 std::shared_ptr<FileLocation> dst,
47 std::shared_ptr<FileRegistryService> file_registry_service=
nullptr);
68 std::shared_ptr<WMS> wms =
nullptr;
70 bool processNextMessage();
72 struct CopyRequestSpecs {
74 std::shared_ptr<FileLocation> src;
75 std::shared_ptr<FileLocation> dst;
76 std::shared_ptr<FileRegistryService> file_registry_service;
79 std::shared_ptr<FileLocation> src,
80 std::shared_ptr<FileLocation> dst,
81 std::shared_ptr<FileRegistryService> file_registry_service) :
82 file(file), src(src), dst(dst), file_registry_service(file_registry_service) {}
84 bool operator==(
const CopyRequestSpecs &rhs)
const {
85 return (file == rhs.file) &&
86 (dst->getStorageService() == rhs.dst->getStorageService()) &&
87 (dst->getAbsolutePathAtMountPoint() == rhs.dst->getAbsolutePathAtMountPoint());
91 std::list<std::unique_ptr<CopyRequestSpecs>> pending_file_copies;
102 #endif //WRENCH_DATAMOVEMENTMANAGER_H
void stop()
Stop the manager.
Definition: DataMovementManager.cpp:55
void kill()
Kill the manager (brutally terminate the daemon)
Definition: DataMovementManager.cpp:45
bool operator==(const BatchJobSet &left, const BatchJobSet &right)
Overloaded operator.
Definition: NodeAvailabilityTimeLine.cpp:24
A helper daemon (co-located with a WMS) that handles data movement operations.
Definition: DataMovementManager.h:31
DataMovementManager(std::shared_ptr< WMS > wms)
Constructor.
Definition: DataMovementManager.cpp:34
void initiateAsynchronousFileCopy(WorkflowFile *file, std::shared_ptr< FileLocation > src, std::shared_ptr< FileLocation > dst, std::shared_ptr< FileRegistryService > file_registry_service=nullptr)
Ask the data manager to initiate an asynchronous file copy.
Definition: DataMovementManager.cpp:73
void doSynchronousFileCopy(WorkflowFile *file, std::shared_ptr< FileLocation > src, std::shared_ptr< FileLocation > dst, std::shared_ptr< FileRegistryService > file_registry_service=nullptr)
Ask the data manager to perform a synchronous file copy.
Definition: DataMovementManager.cpp:115
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 data file used/produced by a WorkflowTask in a Workflow.
Definition: WorkflowFile.h:26
A workflow management system (WMS)
Definition: WMS.h:43