wrench::FileTransferThread Class Reference
A helper class that implements the concept of a communication thread that performs a file transfer. More...
#include <FileTransferThread.h>
Inheritance diagram for wrench::FileTransferThread:
Public Member Functions | |
FileTransferThread (std::string hostname, std::shared_ptr< StorageService > parent, WorkflowFile *file, std::string src_mailbox, std::shared_ptr< FileLocation > dst_location, std::string answer_mailbox_if_read, std::string answer_mailbox_if_write, std::string answer_mailbox_if_copy, unsigned long buffer_size, SimulationTimestampFileCopyStart *start_timestamp=nullptr) | |
Constructor. More... | |
FileTransferThread (std::string hostname, std::shared_ptr< StorageService > parent, WorkflowFile *file, std::shared_ptr< FileLocation > src_location, std::string dst_mailbox, std::string answer_mailbox_if_read, std::string answer_mailbox_if_write, std::string answer_mailbox_if_copy, unsigned long buffer_size, SimulationTimestampFileCopyStart *start_timestamp=nullptr) | |
Constructor. More... | |
FileTransferThread (std::string hostname, std::shared_ptr< StorageService > parent, WorkflowFile *file, std::shared_ptr< FileLocation > src_location, std::shared_ptr< FileLocation > dsg_location, std::string answer_mailbox_if_read, std::string answer_mailbox_if_write, std::string answer_mailbox_if_copy, unsigned long buffer_size, SimulationTimestampFileCopyStart *start_timestamp=nullptr) | |
Constructor. More... | |
void | cleanup (bool has_returned_from_main, int return_value) override |
Cleanup method. More... | |
int | main () override |
Main method. More... | |
Detailed Description
A helper class that implements the concept of a communication thread that performs a file transfer.
Constructor & Destructor Documentation
◆ FileTransferThread() [1/3]
wrench::FileTransferThread::FileTransferThread | ( | std::string | hostname, |
std::shared_ptr< StorageService > | parent, | ||
WorkflowFile * | file, | ||
std::string | src_mailbox, | ||
std::shared_ptr< FileLocation > | dst_location, | ||
std::string | answer_mailbox_if_read, | ||
std::string | answer_mailbox_if_write, | ||
std::string | answer_mailbox_if_copy, | ||
unsigned long | buffer_size, | ||
SimulationTimestampFileCopyStart * | start_timestamp = nullptr |
||
) |
Constructor.
- Parameters
-
hostname host on which to run parent the parent storage service file the file corresponding to the connection src_mailbox the a source mailbox to receive data from dst_location a location to write data to answer_mailbox_if_read the mailbox to send an answer to in case this was a file read ("" if none). This will simply be reported to the parent service, who may use it as needed answer_mailbox_if_write the mailbox to send an answer to in case this was a file write ("" if none). This will simply be reported to the parent service, who may use it as needed answer_mailbox_if_copy the mailbox to send an answer to in case this was a file copy ("" if none). This will simply be reported to the parent service, who may use it as needed buffer_size the buffer size to use start_timestamp if this is a file copy, a start timestamp associated with it
◆ FileTransferThread() [2/3]
wrench::FileTransferThread::FileTransferThread | ( | std::string | hostname, |
std::shared_ptr< StorageService > | parent, | ||
WorkflowFile * | file, | ||
std::shared_ptr< FileLocation > | src_location, | ||
std::string | dst_mailbox, | ||
std::string | answer_mailbox_if_read, | ||
std::string | answer_mailbox_if_write, | ||
std::string | answer_mailbox_if_copy, | ||
unsigned long | buffer_size, | ||
SimulationTimestampFileCopyStart * | start_timestamp = nullptr |
||
) |
Constructor.
- Parameters
-
hostname host on which to run parent the parent storage service file the file corresponding to the connection src_location a location to read data from dst_mailbox a mailbox to send data to answer_mailbox_if_read the mailbox to send an answer to in case this was a file read ("" if none). This will simply be reported to the parent service, who may use it as needed answer_mailbox_if_write the mailbox to send an answer to in case this was a file write ("" if none). This will simply be reported to the parent service, who may use it as needed answer_mailbox_if_copy the mailbox to send an answer to in case this was a file copy ("" if none). This will simply be reported to the parent service, who may use it as needed buffer_size the buffer size to use start_timestamp if this is a file copy, a start timestamp associated with it
◆ FileTransferThread() [3/3]
wrench::FileTransferThread::FileTransferThread | ( | std::string | hostname, |
std::shared_ptr< StorageService > | parent, | ||
WorkflowFile * | file, | ||
std::shared_ptr< FileLocation > | src_location, | ||
std::shared_ptr< FileLocation > | dst_location, | ||
std::string | answer_mailbox_if_read, | ||
std::string | answer_mailbox_if_write, | ||
std::string | answer_mailbox_if_copy, | ||
unsigned long | buffer_size, | ||
SimulationTimestampFileCopyStart * | start_timestamp = nullptr |
||
) |
Constructor.
- Parameters
-
hostname host on which to run parent the parent storage service file the file corresponding to the connection src_location a location to read data from dst_location a location to send data to answer_mailbox_if_read the mailbox to send an answer to in case this was a file read ("" if none). This will simply be reported to the parent service, who may use it as needed answer_mailbox_if_write the mailbox to send an answer to in case this was a file write ("" if none). This will simply be reported to the parent service, who may use it as needed answer_mailbox_if_copy the mailbox to send an answer to in case this was a file copy ("" if none). This will simply be reported to the parent service, who may use it as needed buffer_size the buffer size to use start_timestamp if this is a file copy, a start timestamp associated with it
Member Function Documentation
◆ cleanup()
|
override |
◆ main()
|
override |
Main method.
- Returns
- 0 on success, non-zero otherwise
Sending a local file to the network
Receiving a file from the network
Copying a file local file
Downloading a file from another storage service
The documentation for this class was generated from the following files:
- /home/wrench/wrench/include/wrench/services/storage/storage_helpers/FileTransferThread.h
- /home/wrench/wrench/src/wrench/services/storage/storage_helper_classes/FileTransferThread.cpp