hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
HCE::drce::DRCECommonTask Class Reference

#include <DRCECommonTask.hpp>

Inheritance diagram for HCE::drce::DRCECommonTask:
Collaboration diagram for HCE::drce::DRCECommonTask:

Classes

class  ApplyPidHandler

Public Types

typedef std::vector< std::pair
< unsigned int,
SessionOptions::CleanupFlag > > 
SubtasksList

Public Member Functions

 DRCECommonTask (const std::string &taskName_, DRCENodeOptions &nodeOptions_, CustomMessage &message_, const DRCETaskRequestSetExecute &taskRequestSetExecute_, DRCEAsyncTasksQueue &asyncTasksQueue_, DRCEResourceMonitor &resourceMonitor_, const DRCEInputJsonMessage &inputJsonMessage, unsigned int parentTaskId_)
virtual void runTask (void)=0
virtual DRCEResultDataItem execute (Process::CallbackFunction fn)=0 throw (Poco::Exception)
void updateTasks (DRCEResultDataItem &resultDataItem, unsigned int &progressCount)
void makeFilesBefore (DRCEFilesList &filesList) throw (Poco::Exception)
void makeFilesAfter (DRCEFilesList &filesList, DRCEResultDataItem &resultDataItem)
unsigned int getParentTaskId (void) const
void saveRequestData (void)
void saveResultData (DRCEResultDataItem &resultDataItem)
void executeSubtasks (DRCEResultDataItem &resultDataItem)
void cleanup (bool needCleanup=false)

Static Public Member Functions

static void updateTasks (DRCEResultDataItem &resultDataItem, DRCENodeOptions &nodeOptions, CustomMessage &message, DRCEAsyncTasksQueue &asyncTasksQueue, unsigned int &progressCount, DRCECommonTask *pCommonTask=nullptr)
static size_t getElapsedTimeMsec (const Poco::Timestamp &tsStart)
static void getSubtasksList (DRCEInputJsonMessage &inputJsonMessage, SubtasksList &subtasks)
static DRCEInputJsonMessage getRequestData (unsigned int taskId, DRCENodeOptions &nodeOptions, CustomMessage &message)
static void waitUpdateAllTasks (unsigned int taskId, DRCENodeOptions &nodeOptions, CustomMessage &message, DRCEAsyncTasksQueue &asyncTasksQueue, Poco::Task *pTask=nullptr)
static void waitEndAllTask (DRCEInputJsonMessage &inputJsonMessage, DRCEAsyncTasksQueue &asyncTasksQueue, Poco::Task *pTask=nullptr)
static void cleanup (unsigned int taskId, DRCENodeOptions &nodeOptions, CustomMessage &message, bool needCleanup=false)
static void cleanup (DRCEInputJsonMessage &inputJsonMessage, DRCENodeOptions &nodeOptions, CustomMessage &message, bool needCleanup=false)
static void saveRequestData (DRCEInputJsonMessage &inputJsonMessage, DRCENodeOptions &nodeOptions, CustomMessage &message)
static void saveRequest (unsigned int taskId, DRCENodeOptions &nodeOptions, CustomMessage &message)
static void saveRequest (DRCEInputJsonMessage &inputJsonMessage, DRCENodeOptions &nodeOptions, CustomMessage &message)
static void saveResultData (DRCEResultDataItem &resultDataItem, DRCENodeOptions &nodeOptions, CustomMessage &message, DRCEAsyncTasksQueue &asyncTasksQueue)
static DRCEResultDataItem makeResultDataItem (DRCEInputJsonMessage &inputJsonMessage, DRCENodeOptions &nodeOptions, CustomMessage &message, DRCETaskRequest::RequestType requestType, DRCETaskRequest::TaskState taskState, unsigned int errorCode=NO_ERROR, const std::string &errorMessage="", unsigned int pid=0, size_t timeElapsed=0, unsigned int exitStatus=0)
static unsigned int getHostParentTaskId (unsigned int taskId, DRCEAsyncTasksQueue &asyncTasksQueue)
static DRCEResultDataItem extractStatusResultDataItem (unsigned int taskId, DRCENodeOptions &nodeOptions, DRCEAsyncTasksQueue &asyncTasksQueue)
static DRCEResultDataItem extractDataResultDataItem (unsigned int taskId, DRCENodeOptions &nodeOptions, DRCEAsyncTasksQueue &asyncTasksQueue)
static void safeCleanup (const std::string &path)
static DRCEResultDataItem extractResultDataItem (const std::string &fileName)

Protected Attributes

DRCENodeOptionsnodeOptions
CustomMessagemessage
DRCETaskRequestSetExecute taskRequestSetExecute
DRCEAsyncTasksQueueasyncTasksQueue
DRCEResourceMonitorresourceMonitor
DRCEInputJsonMessage inputJsonMessage
unsigned int parentTaskId

Detailed Description

Definition at line 39 of file DRCECommonTask.hpp.

Member Typedef Documentation

typedef std::vector<std::pair<unsigned int, SessionOptions::CleanupFlag> > HCE::drce::DRCECommonTask::SubtasksList

Definition at line 42 of file DRCECommonTask.hpp.

Constructor & Destructor Documentation

HCE::drce::DRCECommonTask::DRCECommonTask ( const std::string &  taskName_,
DRCENodeOptions nodeOptions_,
CustomMessage message_,
const DRCETaskRequestSetExecute taskRequestSetExecute_,
DRCEAsyncTasksQueue asyncTasksQueue_,
DRCEResourceMonitor resourceMonitor_,
const DRCEInputJsonMessage inputJsonMessage,
unsigned int  parentTaskId_ 
)

Definition at line 50 of file DRCECommonTask.cpp.

Member Function Documentation

void HCE::drce::DRCECommonTask::cleanup ( bool  needCleanup = false)

Definition at line 135 of file DRCECommonTask.cpp.

Here is the caller graph for this function:

void HCE::drce::DRCECommonTask::cleanup ( unsigned int  taskId,
DRCENodeOptions nodeOptions,
CustomMessage message,
bool  needCleanup = false 
)
static

<Get all subtasks 'tree'

<Cleanup all chain of subtasks and task files (request, data, status)

<Delete data file

<Delete status file

<Delete request file

Definition at line 140 of file DRCECommonTask.cpp.

Here is the call graph for this function:

void HCE::drce::DRCECommonTask::cleanup ( DRCEInputJsonMessage inputJsonMessage,
DRCENodeOptions nodeOptions,
CustomMessage message,
bool  needCleanup = false 
)
static

<Delete status file

<Delete request file

<Delete files array

Definition at line 164 of file DRCECommonTask.cpp.

Here is the call graph for this function:

virtual DRCEResultDataItem HCE::drce::DRCECommonTask::execute ( Process::CallbackFunction  fn) throw (Poco::Exception)
pure virtual
void HCE::drce::DRCECommonTask::executeSubtasks ( DRCEResultDataItem resultDataItem)

Definition at line 229 of file DRCECommonTask.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

DRCEResultDataItem HCE::drce::DRCECommonTask::extractDataResultDataItem ( unsigned int  taskId,
DRCENodeOptions nodeOptions,
DRCEAsyncTasksQueue asyncTasksQueue 
)
static

Definition at line 706 of file DRCECommonTask.cpp.

Here is the call graph for this function:

DRCEResultDataItem HCE::drce::DRCECommonTask::extractResultDataItem ( const std::string &  fileName)
static

Definition at line 675 of file DRCECommonTask.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

DRCEResultDataItem HCE::drce::DRCECommonTask::extractStatusResultDataItem ( unsigned int  taskId,
DRCENodeOptions nodeOptions,
DRCEAsyncTasksQueue asyncTasksQueue 
)
static

Definition at line 697 of file DRCECommonTask.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

size_t HCE::drce::DRCECommonTask::getElapsedTimeMsec ( const Poco::Timestamp &  tsStart)
static

Definition at line 222 of file DRCECommonTask.cpp.

Here is the caller graph for this function:

unsigned int HCE::drce::DRCECommonTask::getHostParentTaskId ( unsigned int  taskId,
DRCEAsyncTasksQueue asyncTasksQueue 
)
static

Definition at line 653 of file DRCECommonTask.cpp.

Here is the call graph for this function:

unsigned int HCE::drce::DRCECommonTask::getParentTaskId ( void  ) const
inline

Definition at line 82 of file DRCECommonTask.hpp.

Here is the caller graph for this function:

DRCEInputJsonMessage HCE::drce::DRCECommonTask::getRequestData ( unsigned int  taskId,
DRCENodeOptions nodeOptions,
CustomMessage message 
)
static

Definition at line 388 of file DRCECommonTask.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::drce::DRCECommonTask::getSubtasksList ( DRCEInputJsonMessage inputJsonMessage,
SubtasksList subtasks 
)
static

Definition at line 365 of file DRCECommonTask.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::drce::DRCECommonTask::makeFilesAfter ( DRCEFilesList filesList,
DRCEResultDataItem resultDataItem 
)

Definition at line 85 of file DRCECommonTask.cpp.

Here is the call graph for this function:

void HCE::drce::DRCECommonTask::makeFilesBefore ( DRCEFilesList filesList) throw (Poco::Exception)

Definition at line 58 of file DRCECommonTask.cpp.

Here is the call graph for this function:

DRCEResultDataItem HCE::drce::DRCECommonTask::makeResultDataItem ( DRCEInputJsonMessage inputJsonMessage,
DRCENodeOptions nodeOptions,
CustomMessage message,
DRCETaskRequest::RequestType  requestType,
DRCETaskRequest::TaskState  taskState,
unsigned int  errorCode = NO_ERROR,
const std::string &  errorMessage = "",
unsigned int  pid = 0,
size_t  timeElapsed = 0,
unsigned int  exitStatus = 0 
)
static

Definition at line 604 of file DRCECommonTask.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void HCE::drce::DRCECommonTask::runTask ( void  )
pure virtual
void HCE::drce::DRCECommonTask::safeCleanup ( const std::string &  path)
static

Definition at line 202 of file DRCECommonTask.cpp.

Here is the caller graph for this function:

void HCE::drce::DRCECommonTask::saveRequest ( unsigned int  taskId,
DRCENodeOptions nodeOptions,
CustomMessage message 
)
static

Definition at line 526 of file DRCECommonTask.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::drce::DRCECommonTask::saveRequest ( DRCEInputJsonMessage inputJsonMessage,
DRCENodeOptions nodeOptions,
CustomMessage message 
)
static

Definition at line 549 of file DRCECommonTask.cpp.

Here is the call graph for this function:

void HCE::drce::DRCECommonTask::saveRequestData ( void  )

Definition at line 499 of file DRCECommonTask.cpp.

void HCE::drce::DRCECommonTask::saveRequestData ( DRCEInputJsonMessage inputJsonMessage,
DRCENodeOptions nodeOptions,
CustomMessage message 
)
static

Definition at line 509 of file DRCECommonTask.cpp.

Here is the call graph for this function:

void HCE::drce::DRCECommonTask::saveResultData ( DRCEResultDataItem resultDataItem)

Definition at line 504 of file DRCECommonTask.cpp.

Here is the caller graph for this function:

void HCE::drce::DRCECommonTask::saveResultData ( DRCEResultDataItem resultDataItem,
DRCENodeOptions nodeOptions,
CustomMessage message,
DRCEAsyncTasksQueue asyncTasksQueue 
)
static

Definition at line 572 of file DRCECommonTask.cpp.

Here is the call graph for this function:

void HCE::drce::DRCECommonTask::updateTasks ( DRCEResultDataItem resultDataItem,
unsigned int &  progressCount 
)

Definition at line 360 of file DRCECommonTask.cpp.

Here is the caller graph for this function:

void HCE::drce::DRCECommonTask::updateTasks ( DRCEResultDataItem resultDataItem,
DRCENodeOptions nodeOptions,
CustomMessage message,
DRCEAsyncTasksQueue asyncTasksQueue,
unsigned int &  progressCount,
DRCECommonTask pCommonTask = nullptr 
)
static

Definition at line 281 of file DRCECommonTask.cpp.

Here is the call graph for this function:

void HCE::drce::DRCECommonTask::waitEndAllTask ( DRCEInputJsonMessage inputJsonMessage,
DRCEAsyncTasksQueue asyncTasksQueue,
Poco::Task *  pTask = nullptr 
)
static

Definition at line 457 of file DRCECommonTask.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::drce::DRCECommonTask::waitUpdateAllTasks ( unsigned int  taskId,
DRCENodeOptions nodeOptions,
CustomMessage message,
DRCEAsyncTasksQueue asyncTasksQueue,
Poco::Task *  pTask = nullptr 
)
static

Definition at line 411 of file DRCECommonTask.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

DRCEAsyncTasksQueue& HCE::drce::DRCECommonTask::asyncTasksQueue
protected

Definition at line 90 of file DRCECommonTask.hpp.

DRCEInputJsonMessage HCE::drce::DRCECommonTask::inputJsonMessage
protected

Definition at line 92 of file DRCECommonTask.hpp.

CustomMessage& HCE::drce::DRCECommonTask::message
protected

Definition at line 88 of file DRCECommonTask.hpp.

DRCENodeOptions& HCE::drce::DRCECommonTask::nodeOptions
protected

Definition at line 87 of file DRCECommonTask.hpp.

unsigned int HCE::drce::DRCECommonTask::parentTaskId
protected

Definition at line 93 of file DRCECommonTask.hpp.

DRCEResourceMonitor& HCE::drce::DRCECommonTask::resourceMonitor
protected

Definition at line 91 of file DRCECommonTask.hpp.

DRCETaskRequestSetExecute HCE::drce::DRCECommonTask::taskRequestSetExecute
protected

Definition at line 89 of file DRCECommonTask.hpp.


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