9#include "rotor/supervisor.h"
10#include "rotor/fltk/export.h"
11#include "rotor/fltk/supervisor_config_fltk.h"
14#include <unordered_map>
49 void shutdown() noexcept override;
53 template <typename T> auto &access() noexcept;
77 using timers_map_t = std::unordered_map<request_id_t, timer_ptr_t>;
Basic namespace for all rotor functionalities.
Definition rotor.hpp:21
intrusive_ptr_t< message_base_t > message_ptr_t
intrusive pointer for message
Definition message.h:118
std::size_t request_id_t
timer identifier type in the scope of the actor
Definition forward.hpp:34
boost::intrusive_ptr< T > intrusive_ptr_t
alias for intrusive pointer
Definition arc.hpp:27
timer structure, adopted for fltk-supervisor needs.
Definition supervisor_fltk.h:58
supervisor_ptr_t sup
intrusive pointer to the supervisor
Definition supervisor_fltk.h:66
timer_t(supervisor_ptr_t supervisor, timer_handler_base_t *handler)
constructs timer from flt supervisor and timer handler
intrusive_ptr_t< supervisor_fltk_t > supervisor_ptr_t
alias for intrusive pointer for the fltk supervisor
Definition supervisor_fltk.h:60
timer_handler_base_t * handler
non-owning pointer to timer handler
Definition supervisor_fltk.h:69
delivers rotor-messages on top of fltk async callback
Definition supervisor_fltk.h:38
timers_map_t timers_map
timer id to timer pointer mapping
Definition supervisor_fltk.h:83
supervisor_fltk_t(supervisor_config_fltk_t &config)
constructs new supervisor from supervisor config
void do_cancel_timer(request_id_t timer_id) noexcept override
cancels timer (to be implemented in descendants)
void start() noexcept override
thread-safe version of do_process
std::unique_ptr< timer_t > timer_ptr_t
unique pointer to timer
Definition supervisor_fltk.h:74
std::unordered_map< request_id_t, timer_ptr_t > timers_map_t
timer id to timer pointer mapping type
Definition supervisor_fltk.h:77
void do_start_timer(const pt::time_duration &interval, timer_handler_base_t &handler) noexcept override
starts non-recurring timer (to be implemented in descendants)
CRTP supervisor config builder.
Definition supervisor_config.h:72
base supervisor config, which holds shutdown timeout value
Definition supervisor_config.h:23
supervisor is responsible for managing actors (workers) lifetime
Definition supervisor.h:69
Base class for timer handler.
Definition timer_handler.hpp:17