ARC SDK
Data Structures | Public Member Functions
DataStaging::Processor Class Reference

The Processor performs pre- and post-transfer operations. More...

#include <arc/data-staging/Processor.h>

Inheritance diagram for DataStaging::Processor:
DataStaging::DTRCallback

Public Member Functions

 Processor ()
 Constructor. More...
 
 ~Processor ()
 Destructor waits for all active threads to stop. More...
 
void start (void)
 Start Processor. More...
 
void stop (void)
 Stop Processor. More...
 
virtual void receiveDTR (DTR_ptr dtr)
 Send a DTR to the Processor. More...
 
- Public Member Functions inherited from DataStaging::DTRCallback
virtual ~DTRCallback ()
 Empty virtual destructor. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

DataStaging::Processor::Processor ( )
inline

Constructor.

DataStaging::Processor::~Processor ( )
inline

Destructor waits for all active threads to stop.

Member Function Documentation

virtual void DataStaging::Processor::receiveDTR ( DTR_ptr  dtr)
virtual

Send a DTR to the Processor.

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 pushes the DTR back to 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 are short-lived it is better to wait rather than interrupt them.


The documentation for this class was generated from the following file: