The Processor performs pre- and post-transfer operations. More...
#include <Processor.h>
Data Structures | |
class | BulkThreadArgument |
Class used to pass information to spawned thread (for bulk operations). | |
class | ThreadArgument |
Class used to pass information to spawned thread. | |
Public Member Functions | |
Processor () | |
~Processor () | |
void | start (void) |
void | stop (void) |
virtual void | receiveDTR (DTR_ptr dtr) |
The Processor performs pre- and post-transfer operations.
The Processor takes care of everything that should happen before and after a transfer takes place. Calling receiveDTR() spawns a thread to perform the required operation depending on the DTR state.
virtual void DataStaging::Processor::receiveDTR | ( | DTR_ptr | dtr | ) | [virtual] |
The DTR is sent to the Processor through this method when some long-latency processing is to be performed, eg contacting a remote service. The Processor spawns a thread to do the processing, and then returns. The thread notifies the scheduler when it is finished.
Implements DataStaging::DTRCallback.
void DataStaging::Processor::start | ( | void | ) |
Start Processor.
This method actually does nothing. It is here only to make all classes of data staging to look alike. But it is better to call it before starting to use object because it may do something in the future.
void DataStaging::Processor::stop | ( | void | ) |
Stop Processor.
This method sends waits for all started threads to end and exits. Since threads a short-lived it is better to wait rather than interrupt them.
Referenced by ~Processor().