BeeeOn Gateway
v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
|
Public Member Functions | |
void | registerExporter (Poco::SharedPtr< Exporter > exporter) override |
void | exportData (const SensorData &sensorData) override |
void | setQueueCapacity (int capacity) |
void | setQueueTreshold (int treshold) |
void | setQueueBatchSize (int batchSize) |
void | setDeadTimeout (const Poco::Timespan &timeout) |
void | setIdleTimeout (const Poco::Timespan &timeout) |
void | run () override |
void | stop () override |
Public Member Functions inherited from BeeeOn::AbstractDistributor | |
void | registerListener (DistributorListener::Ptr listener) |
void | setExecutor (AsyncExecutor::Ptr executor) |
Public Member Functions inherited from BeeeOn::Loggable | |
Loggable (const ClassInfo &info) | |
Loggable (const std::type_info &info) | |
Protected Attributes | |
std::vector< ExporterQueue::Ptr > | m_queues |
Poco::Event | m_newData |
Poco::AtomicCounter | m_stop |
Poco::Timespan | m_deadTimeout |
Poco::Timespan | m_idleTimeout |
int | m_queueCapacity |
int | m_batchSize |
int | m_treshold |
Protected Attributes inherited from BeeeOn::AbstractDistributor | |
std::vector< Poco::SharedPtr < Exporter > > | m_exporters |
EventSource< DistributorListener > | m_eventSource |
Additional Inherited Members | |
Public Types inherited from BeeeOn::Distributor | |
typedef Poco::SharedPtr < Distributor > | Ptr |
Public Types inherited from BeeeOn::StoppableRunnable | |
typedef Poco::SharedPtr < StoppableRunnable > | Ptr |
Static Public Member Functions inherited from BeeeOn::Loggable | |
static Poco::Logger & | forMethod (const char *name) |
static Poco::Logger & | forClass (const ClassInfo &info) |
static Poco::Logger & | forClass (const std::type_info &info) |
template<typename T > | |
static Poco::Logger & | forInstance (const T *i) |
static void | configureSimple (Poco::Logger &logger, const std::string &level) |
static void | logException (Poco::Logger &logger, const Poco::Message::Priority priority, const Poco::Exception &e, const char *file, size_t line) |
Protected Member Functions inherited from BeeeOn::AbstractDistributor | |
void | notifyListeners (const SensorData &data) |
Protected Member Functions inherited from BeeeOn::Loggable | |
void | setupLogger (Poco::Logger *logger=0) const |
Poco::Logger & | logger () const |
void QueuingDistributor::setDeadTimeout | ( | const Poco::Timespan & | timeout | ) |
The "not working" ExporterQueue tries to export data when the deadTimeout has elapsed since queue's thershold of fails was exceeded.
void QueuingDistributor::setIdleTimeout | ( | const Poco::Timespan & | timeout | ) |
When all ExporterQueues are broken or empty, exporting thread sleeps for the idleTimeout. New incoming data wakes the thread up.
|
overridevirtual |
Stop the runnable. The call should not block.
Implements BeeeOn::StoppableRunnable.