|
SObjectizer
5.5
|
An interface for all dispatchers. More...
#include <disp.hpp>
Public Member Functions | |
| dispatcher_t ()=default | |
| virtual | ~dispatcher_t () SO_5_NOEXCEPT=default |
| dispatcher_t * | self_ptr () |
| virtual void | start (environment_t &env)=0 |
| Launch the dispatcher. More... | |
| virtual void | shutdown ()=0 |
| Signal about shutdown. More... | |
| virtual void | wait ()=0 |
| Wait for the full stop of the dispatcher. More... | |
| virtual void | set_data_sources_name_base (const std::string &name) |
| Set basic part of names for data sources for run-time monitoring. More... | |
Private Member Functions | |
| dispatcher_t (const dispatcher_t &)=delete | |
| dispatcher_t (dispatcher_t &&)=delete | |
| dispatcher_t & | operator= (const dispatcher_t &)=delete |
| dispatcher_t & | operator= (dispatcher_t &&)=delete |
An interface for all dispatchers.
Dispatcher schedules and calls agents' events.
Each agent is binded to a dispatcher during the registration. A dispatcher_binder_t object is used for this.
Each agent stores its events in the own event queue. When event is stored in the queue an agent informs its dispatcher about it. The dispatcher should schedule the agent for the event execution on the agent's working thread context.
|
privatedelete |
|
privatedelete |
|
default |
Do nothing.
|
virtualdefault |
Do nothing.
|
privatedelete |
|
privatedelete |
|
inline |
Auxiliary method.
|
virtual |
Set basic part of names for data sources for run-time monitoring.
| name | Part of name to be used in creation of actual names of data sources. Could me empty. In that case the dispatcher will use some other value for creating names of data sources (something like this pointer). |
Reimplemented in so_5::env_infrastructures::st_reusable_stuff::default_disp_impl_t< Event_Queue_Type, Activity_Tracker, Data_Source_Name_Parts >, so_5::env_infrastructures::st_reusable_stuff::default_disp_impl_t< Activity_Tracker >, so_5::disp::thread_pool::common_implementation::dispatcher_t< Work_Thread, Dispatcher_Queue, Agent_Queue, Params, Adaptations >, so_5::disp::one_thread::impl::actual_dispatcher_t< Work_Thread >, so_5::disp::active_group::impl::dispatcher_template_t< Work_Thread >, so_5::disp::active_obj::impl::dispatcher_template_t< Work_Thread >, so_5::disp::prio_dedicated_threads::one_per_prio::impl::dispatcher_template_t< Work_Thread >, so_5::disp::prio_one_thread::quoted_round_robin::impl::dispatcher_template_t< Work_Thread >, and so_5::disp::prio_one_thread::strictly_ordered::impl::dispatcher_template_t< Work_Thread >.
|
pure virtual |
Signal about shutdown.
Dispatcher must initiate actions for the shutting down of all working threads. This method shall not block caller until all threads have beed stopped.
Implemented in so_5::env_infrastructures::st_reusable_stuff::default_disp_impl_t< Event_Queue_Type, Activity_Tracker, Data_Source_Name_Parts >, so_5::env_infrastructures::st_reusable_stuff::default_disp_impl_t< Activity_Tracker >, so_5::disp::thread_pool::common_implementation::dispatcher_t< Work_Thread, Dispatcher_Queue, Agent_Queue, Params, Adaptations >, so_5::disp::one_thread::impl::actual_dispatcher_t< Work_Thread >, so_5::disp::active_group::impl::dispatcher_template_t< Work_Thread >, so_5::disp::active_obj::impl::dispatcher_template_t< Work_Thread >, so_5::disp::prio_dedicated_threads::one_per_prio::impl::dispatcher_template_t< Work_Thread >, so_5::disp::prio_one_thread::quoted_round_robin::impl::dispatcher_template_t< Work_Thread >, and so_5::disp::prio_one_thread::strictly_ordered::impl::dispatcher_template_t< Work_Thread >.
|
pure virtual |
Launch the dispatcher.
| env | SObjectizer Environment to work in. |
Implemented in so_5::env_infrastructures::st_reusable_stuff::default_disp_impl_t< Event_Queue_Type, Activity_Tracker, Data_Source_Name_Parts >, so_5::env_infrastructures::st_reusable_stuff::default_disp_impl_t< Activity_Tracker >, so_5::disp::thread_pool::common_implementation::dispatcher_t< Work_Thread, Dispatcher_Queue, Agent_Queue, Params, Adaptations >, so_5::disp::one_thread::impl::actual_dispatcher_t< Work_Thread >, so_5::disp::active_group::impl::dispatcher_template_t< Work_Thread >, so_5::disp::active_obj::impl::dispatcher_template_t< Work_Thread >, so_5::disp::prio_dedicated_threads::one_per_prio::impl::dispatcher_template_t< Work_Thread >, so_5::disp::prio_one_thread::quoted_round_robin::impl::dispatcher_template_t< Work_Thread >, and so_5::disp::prio_one_thread::strictly_ordered::impl::dispatcher_template_t< Work_Thread >.
|
pure virtual |
Wait for the full stop of the dispatcher.
This method must block the caller until all working threads have been stopped.
Implemented in so_5::env_infrastructures::st_reusable_stuff::default_disp_impl_t< Event_Queue_Type, Activity_Tracker, Data_Source_Name_Parts >, so_5::env_infrastructures::st_reusable_stuff::default_disp_impl_t< Activity_Tracker >, so_5::disp::thread_pool::common_implementation::dispatcher_t< Work_Thread, Dispatcher_Queue, Agent_Queue, Params, Adaptations >, so_5::disp::one_thread::impl::actual_dispatcher_t< Work_Thread >, so_5::disp::active_group::impl::dispatcher_template_t< Work_Thread >, so_5::disp::active_obj::impl::dispatcher_template_t< Work_Thread >, so_5::disp::prio_dedicated_threads::one_per_prio::impl::dispatcher_template_t< Work_Thread >, so_5::disp::prio_one_thread::quoted_round_robin::impl::dispatcher_template_t< Work_Thread >, and so_5::disp::prio_one_thread::strictly_ordered::impl::dispatcher_template_t< Work_Thread >.
1.8.14