#include <taskOldb.hpp>
Public Member Functions | |
| TaskOldb (rad::DoubleMap< rad::cii::OldbType > &oldb_map, rad::cii::OldbAdapter &oldb_adapter, std::chrono::milliseconds period) | |
| Class constructor. | |
| virtual | ~TaskOldb () |
| Default destructor. | |
| void | Run () |
| Thread run method. | |
| void | StartThread () |
| void | StopThread () |
| TaskOldb (const TaskOldb &)=delete | |
| Disable copy constructor. | |
| TaskOldb & | operator= (const TaskOldb &)=delete |
| Disable assignment operator. | |
This class implements a worker thread to manage OLDB writes separately from the main thread and thus reducing the CPU usage for applications writing many attributes into the OLDB in a short time.
| ifw::core::utils::bat::TaskOldb::TaskOldb | ( | rad::DoubleMap< rad::cii::OldbType > & | oldb_map, |
| rad::cii::OldbAdapter & | oldb_adapter, | ||
| std::chrono::milliseconds | period ) |
Class constructor.
| [in] | oldb_map | Reference to double map object |
| [in] | db_timeout | OLDB connection timeout. |
| [in] | period | Worker thread periodicity. |
|
virtual |
Default destructor.
|
delete |
Disable copy constructor.
Disable assignment operator.
| void ifw::core::utils::bat::TaskOldb::Run | ( | ) |
Thread run method.
This method runs an infinite loop with a wait time defined by the period. In each loop, it writes all the attributes found in the internal double map.
| void ifw::core::utils::bat::TaskOldb::StartThread | ( | ) |
| void ifw::core::utils::bat::TaskOldb::StopThread | ( | ) |