|
SObjectizer
5.5
|
An interface for environment_infrastructure entity. More...
#include <environment_infrastructure.hpp>
Classes | |
| struct | coop_repository_stats_t |
| Statistical data for run-time monitoring of coop repository content. More... | |
Public Types | |
| using | env_init_t = std::function< void() > |
| Type of function for performing environment initialization actions. More... | |
Public Member Functions | |
| environment_infrastructure_t ()=default | |
| environment_infrastructure_t (const environment_infrastructure_t &)=delete | |
| environment_infrastructure_t (environment_infrastructure_t &&)=delete | |
| environment_infrastructure_t & | operator= (const environment_infrastructure_t &)=delete |
| environment_infrastructure_t & | operator= (environment_infrastructure_t &&)=delete |
| virtual | ~environment_infrastructure_t () noexcept=default |
| virtual void | launch (env_init_t init_fn)=0 |
| Do actual launch of SObjectizer's Environment. More... | |
| virtual void | stop ()=0 |
| Initiate a signal for shutdown of Environment. More... | |
| virtual SO_5_NODISCARD coop_unique_holder_t | make_coop (coop_handle_t parent, disp_binder_shptr_t default_binder)=0 |
| Create an instance of a new coop. More... | |
| virtual SO_5_NODISCARD coop_handle_t | register_coop (coop_unique_holder_t coop)=0 |
| Register new cooperation. More... | |
| virtual void | ready_to_deregister_notify (coop_shptr_t coop) noexcept=0 |
| virtual bool | final_deregister_coop (coop_shptr_t coop)=0 |
| Do final actions of the cooperation deregistration. More... | |
| virtual so_5::timer_id_t | schedule_timer (const std::type_index &type_wrapper, const message_ref_t &msg, const mbox_t &mbox, std::chrono::steady_clock::duration pause, std::chrono::steady_clock::duration period)=0 |
| Initiate a timer (delayed or periodic message). More... | |
| virtual void | single_timer (const std::type_index &type_wrapper, const message_ref_t &msg, const mbox_t &mbox, std::chrono::steady_clock::duration pause)=0 |
| Initiate a delayed message. More... | |
| virtual ::so_5::stats::controller_t & | stats_controller () noexcept=0 |
| Get stats controller for the environment. More... | |
| virtual ::so_5::stats::repository_t & | stats_repository () noexcept=0 |
| Get stats repository for the environment. More... | |
| virtual coop_repository_stats_t | query_coop_repository_stats ()=0 |
| Query run-time statistics for cooperation repository. More... | |
| virtual timer_thread_stats_t | query_timer_thread_stats ()=0 |
| Query run-time statistics for timer (thread or manager). More... | |
| virtual disp_binder_shptr_t | make_default_disp_binder ()=0 |
| Create a binder for the default dispatcher. More... | |
Static Public Member Functions | |
| static environment_infrastructure_deleter_fnptr_t | default_deleter () |
| Default deleter for environment_infrastructure object. More... | |
An interface for environment_infrastructure entity.
Environment infrastructure implements several important parts of SObjectizer's Environment:
This class defines the interface of environment_infrastructure. All environment_infrastructure implementations must inherit this interface.
| using so_5::environment_infrastructure_t::env_init_t = std::function< void() > |
Type of function for performing environment initialization actions.
|
default |
|
delete |
|
delete |
|
virtualdefaultnoexcept |
|
inlinestatic |
Default deleter for environment_infrastructure object.
This function is intended for simplification of code where environment_infrastructure_unique_ptr_t must be created with default deleter.
For example:
|
pure virtual |
Do final actions of the cooperation deregistration.
| true | there are some live cooperations. |
| false | there is no more live cooperations. |
| coop | Cooperation to be deregistered. |
Implemented in so_5::env_infrastructures::simple_mtsafe::impl::env_infrastructure_t< Activity_Tracker >, so_5::env_infrastructures::simple_not_mtsafe::impl::env_infrastructure_t< Activity_Tracker >, and so_5::env_infrastructures::default_mt::impl::mt_env_infrastructure_t.
|
pure virtual |
Do actual launch of SObjectizer's Environment.
This method is called as a final step of environment lauch procedure.
Stats_controller, all additional layers and dispatchers are already started before calling on this method.
This method must lock the current thread and return only when SObjectizer's Environment finishes its work.
| init_fn | Actions from Environment which must be performed to complete launch procedure. |
Implemented in so_5::env_infrastructures::simple_mtsafe::impl::env_infrastructure_t< Activity_Tracker >, so_5::env_infrastructures::simple_not_mtsafe::impl::env_infrastructure_t< Activity_Tracker >, and so_5::env_infrastructures::default_mt::impl::mt_env_infrastructure_t.
|
pure virtual |
Create an instance of a new coop.
| parent | Optinal parent coop. |
| default_binder | Default binder for that coop. |
Implemented in so_5::env_infrastructures::simple_mtsafe::impl::env_infrastructure_t< Activity_Tracker >, so_5::env_infrastructures::simple_not_mtsafe::impl::env_infrastructure_t< Activity_Tracker >, and so_5::env_infrastructures::default_mt::impl::mt_env_infrastructure_t.
|
pure virtual |
Create a binder for the default dispatcher.
Implemented in so_5::env_infrastructures::simple_mtsafe::impl::env_infrastructure_t< Activity_Tracker >, so_5::env_infrastructures::simple_not_mtsafe::impl::env_infrastructure_t< Activity_Tracker >, and so_5::env_infrastructures::default_mt::impl::mt_env_infrastructure_t.
|
delete |
|
delete |
|
pure virtual |
Query run-time statistics for cooperation repository.
Implemented in so_5::env_infrastructures::simple_mtsafe::impl::env_infrastructure_t< Activity_Tracker >, so_5::env_infrastructures::simple_not_mtsafe::impl::env_infrastructure_t< Activity_Tracker >, and so_5::env_infrastructures::default_mt::impl::mt_env_infrastructure_t.
|
pure virtual |
Query run-time statistics for timer (thread or manager).
Implemented in so_5::env_infrastructures::simple_mtsafe::impl::env_infrastructure_t< Activity_Tracker >, so_5::env_infrastructures::simple_not_mtsafe::impl::env_infrastructure_t< Activity_Tracker >, and so_5::env_infrastructures::default_mt::impl::mt_env_infrastructure_t.
|
pure virtualnoexcept |
Notification about cooperation for which the final dereg step can be performed.
| coop | A cooperation which can be finaly deregistered. |
Implemented in so_5::env_infrastructures::simple_mtsafe::impl::env_infrastructure_t< Activity_Tracker >, so_5::env_infrastructures::simple_not_mtsafe::impl::env_infrastructure_t< Activity_Tracker >, and so_5::env_infrastructures::default_mt::impl::mt_env_infrastructure_t.
|
pure virtual |
Register new cooperation.
| coop | Cooperation to be registered. |
Implemented in so_5::env_infrastructures::simple_mtsafe::impl::env_infrastructure_t< Activity_Tracker >, so_5::env_infrastructures::simple_not_mtsafe::impl::env_infrastructure_t< Activity_Tracker >, and so_5::env_infrastructures::default_mt::impl::mt_env_infrastructure_t.
|
pure virtual |
Initiate a timer (delayed or periodic message).
Implemented in so_5::env_infrastructures::simple_mtsafe::impl::env_infrastructure_t< Activity_Tracker >, so_5::env_infrastructures::simple_not_mtsafe::impl::env_infrastructure_t< Activity_Tracker >, and so_5::env_infrastructures::default_mt::impl::mt_env_infrastructure_t.
|
pure virtual |
Initiate a delayed message.
Implemented in so_5::env_infrastructures::simple_mtsafe::impl::env_infrastructure_t< Activity_Tracker >, so_5::env_infrastructures::simple_not_mtsafe::impl::env_infrastructure_t< Activity_Tracker >, and so_5::env_infrastructures::default_mt::impl::mt_env_infrastructure_t.
|
pure virtualnoexcept |
Get stats controller for the environment.
Implemented in so_5::env_infrastructures::simple_mtsafe::impl::env_infrastructure_t< Activity_Tracker >, so_5::env_infrastructures::simple_not_mtsafe::impl::env_infrastructure_t< Activity_Tracker >, and so_5::env_infrastructures::default_mt::impl::mt_env_infrastructure_t.
|
pure virtualnoexcept |
Get stats repository for the environment.
Implemented in so_5::env_infrastructures::simple_mtsafe::impl::env_infrastructure_t< Activity_Tracker >, so_5::env_infrastructures::simple_not_mtsafe::impl::env_infrastructure_t< Activity_Tracker >, and so_5::env_infrastructures::default_mt::impl::mt_env_infrastructure_t.
|
pure virtual |
Initiate a signal for shutdown of Environment.
Implemented in so_5::env_infrastructures::simple_mtsafe::impl::env_infrastructure_t< Activity_Tracker >, so_5::env_infrastructures::simple_not_mtsafe::impl::env_infrastructure_t< Activity_Tracker >, and so_5::env_infrastructures::default_mt::impl::mt_env_infrastructure_t.
1.8.14