10 #ifndef WRENCH_FILE_COPY_ACTION_H
11 #define WRENCH_FILE_COPY_ACTION_H
15 #include "wrench/action/Action.h"
28 std::shared_ptr<DataFile>
getFile()
const;
37 FileCopyAction(
const std::string& name, std::shared_ptr<CompoundJob> job,
38 std::shared_ptr<DataFile>file,
39 std::shared_ptr<FileLocation> src_file_location,
40 std::shared_ptr<FileLocation> dst_file_location);
43 void execute(std::shared_ptr<ActionExecutor> action_executor)
override;
44 void terminate(std::shared_ptr<ActionExecutor> action_executor)
override;
47 std::shared_ptr<DataFile>file;
48 std::shared_ptr<FileLocation> src_file_location;
49 std::shared_ptr<FileLocation> dst_file_location;
54 #endif //WRENCH_FILE_COPY_ACTION_H
void terminate(std::shared_ptr< ActionExecutor > action_executor) override
Method called when the action terminates.
Definition: FileCopyAction.cpp:83
A class that implements a file copy action.
Definition: FileCopyAction.h:25
void execute(std::shared_ptr< ActionExecutor > action_executor) override
Method to execute the action.
Definition: FileCopyAction.cpp:71
std::shared_ptr< FileLocation > getSourceFileLocation() const
Returns the action's source file location.
Definition: FileCopyAction.cpp:55
std::shared_ptr< DataFile > getFile() const
Returns the action's file.
Definition: FileCopyAction.cpp:47
Definition: Action.cpp:28
FileCopyAction(const std::string &name, std::shared_ptr< CompoundJob > job, std::shared_ptr< DataFile >file, std::shared_ptr< FileLocation > src_file_location, std::shared_ptr< FileLocation > dst_file_location)
Constructor.
Definition: FileCopyAction.cpp:33
bool usesScratch() const override
Determine whether the action uses scratch.
Definition: FileCopyAction.cpp:92
An abstract class that implements the concept of an action.
Definition: Action.h:28
std::shared_ptr< FileLocation > getDestinationFileLocation() const
Returns the action's destination file location.
Definition: FileCopyAction.cpp:63
A compound job.
Definition: CompoundJob.h:47