11 #ifndef WRENCH_DATAMOVEMENTMANAGER_H
12 #define WRENCH_DATAMOVEMENTMANAGER_H
16 #include "wrench/simgrid_S4U_util/S4U_Daemon.h"
17 #include "wrench/services/storage/storage_helpers/FileLocation.h"
24 class FileRegistryService;
25 class ExecutionController;
44 std::shared_ptr<FileLocation> src,
45 std::shared_ptr<FileLocation> dst,
46 std::shared_ptr<FileRegistryService> file_registry_service=
nullptr);
49 std::shared_ptr<FileLocation> src,
50 std::shared_ptr<FileLocation> dst,
51 std::shared_ptr<FileRegistryService> file_registry_service=
nullptr);
73 simgrid::s4u::Mailbox *getCreatorMailbox();
75 simgrid::s4u::Mailbox *creator_mailbox;
77 bool processNextMessage();
79 struct CopyRequestSpecs {
80 std::shared_ptr<DataFile>file;
81 std::shared_ptr<FileLocation> src;
82 std::shared_ptr<FileLocation> dst;
83 std::shared_ptr<FileRegistryService> file_registry_service;
88 CopyRequestSpecs(std::shared_ptr<DataFile> file,
89 std::shared_ptr<FileLocation> src,
90 std::shared_ptr<FileLocation> dst,
91 std::shared_ptr<FileRegistryService> file_registry_service) :
92 file(file), src(src), dst(dst), file_registry_service(file_registry_service) {}
94 bool operator==(
const CopyRequestSpecs &rhs)
const {
95 return (file == rhs.file) &&
96 (dst->getStorageService() == rhs.dst->getStorageService()) &&
97 (dst->getAbsolutePathAtMountPoint() == rhs.dst->getAbsolutePathAtMountPoint());
101 std::list<std::unique_ptr<CopyRequestSpecs>> pending_file_copies;
112 #endif //WRENCH_DATAMOVEMENTMANAGER_H