SObjectizer
5.7
|
Details of SObjectizer run-time implementations. More...
Namespaces | |
adaptive_subscr_storage | |
An adaptive storage for agent's subscriptions information. | |
agent_core_details | |
Implementation details related to cooperations and agents repository. | |
anonymous_namespace{coop.cpp} | |
anonymous_namespace{coop_repository_basis.cpp} | |
anonymous_namespace{mbox_core.cpp} | |
anonymous_namespace{process_unhandled_exception.cpp} | |
coop_dereg | |
Details of cooperation deregistration implementation. | |
hash_table_subscr_storage | |
A hash_table-based storage for agent's subscriptions information. | |
local_mbox_details | |
Implementation details for MPMC mboxes. | |
map_based_subscr_storage | |
A map-based storage for agent's subscriptions information. | |
msg_tracing_helpers | |
Various helpers for message delivery tracing mechanism. | |
subscription_storage_common | |
Common stuff for various subscription storage implementations. | |
vector_based_subscr_storage | |
A vector-based storage for agent's subscriptions information. | |
Classes | |
class | coop_impl_t |
An internal class with real implementation of coop's logic. More... | |
class | coop_private_iface_t |
A special class for accessing private members of agent_coop. More... | |
class | coop_repository_basis_t |
A basic part for various implementations of coop_repository. More... | |
class | delivery_filter_storage_t |
Storage for message delivery filters. More... | |
struct | event_handler_data_t |
Information about event_handler and its properties. More... | |
struct | instantiator_and_sender |
struct | instantiator_and_sender_base |
struct | instantiator_and_sender_base< Message, true > |
class | internal_agent_iface_t |
A special class for access to private/protected members of agent class. More... | |
class | internal_env_iface_t |
A helper class for accessing the functionality of environment-class which is specific for SObjectizer internals only. More... | |
class | layer_core_t |
An utility class for working with layers. More... | |
class | local_mbox_template |
A template with implementation of local mbox. More... | |
class | mbox_core_ref_t |
Smart reference to the mbox_core_t. More... | |
struct | mbox_core_stats_t |
Statistics from mbox_core for run-time monitoring. More... | |
class | mbox_core_t |
A utility class for the work with mboxes. More... | |
class | mbox_iface_for_timers_t |
Helper class for accessing protected members from mbox interface. More... | |
class | mpsc_mbox_template_t |
A multi-producer/single-consumer mbox definition. More... | |
struct | mpsc_mbox_with_message_limits_t |
Helper class to be used in limitful-MPSC mbox. More... | |
struct | mpsc_mbox_without_message_limits_t |
Helper class to be used in limitless-MPSC mbox. More... | |
class | named_local_mbox_t |
A class for the named local mbox. More... | |
class | so_quick_environment_t |
Auxiliary class for the SObjectizer launching. More... | |
class | state_listener_controller_t |
class | state_switch_guard_t |
class | stop_guard_repository_t |
Repository of stop_guards. More... | |
class | subscription_storage_t |
An interface of subscription storage. More... | |
struct | typed_layer_ref_t |
A special wrapper to store a layer with its type. More... | |
Enumerations | |
enum | mpsc_mbox_message_limits_usage_t { mpsc_mbox_message_limits_usage_t::use, mpsc_mbox_message_limits_usage_t::dont_use } |
Indicator for using message limits by MPSC mbox. More... | |
Functions | |
so_layer_list_t::const_iterator | search_for_layer (const so_layer_list_t &layers, const std::type_index &type) |
Find layer in container. More... | |
void | call_shutdown (typed_layer_ref_t &tl) |
void | call_wait (typed_layer_ref_t &tl) |
void | process_unhandled_exception ( current_thread_id_t working_thread_id, const std::exception &ex, agent_t &a_exception_producer) noexcept |
Processor of unhandled exception from agent's event handler. More... | |
void | process_unhandled_unknown_exception ( current_thread_id_t working_thread_id, agent_t &a_exception_producer) noexcept |
Processor of unhandled exception of unknown type from agent's event handler. More... | |
bool | special_agent_ptr_compare (const agent_t &a, const agent_t &b) noexcept |
so_5::disp::mpsc_queue_traits::lock_factory_t | default_lock_factory (environment_t &env, const so_5::disp::mpsc_queue_traits::lock_factory_t &) |
Helper function to be used for extraction of lock_factory for MPSC queues. More... | |
template<typename Init_Fn > | |
void | wrap_init_fn_call (Init_Fn init_fn) |
A special wrapper for calling init function. More... | |
template<typename Q , typename... A> | |
mchain_t | make_mchain (outliving_reference_t< so_5::msg_tracing::holder_t > tracer, const mchain_params_t ¶ms, A &&... args) |
Helper function for creation of a new mchain with respect to message tracing. More... | |
template<typename Init_Fn , typename Deinit_Fn , typename Next_Stage > | |
void | run_stage (const std::string &stage_name, Init_Fn &&init_fn, Deinit_Fn &&deinit_fn, Next_Stage &&next_stage) |
Helper template function for doing initialization phase with rollback on failure. More... | |
void | ensure_join_from_different_thread (current_thread_id_t thread_to_be_joined) |
Ensures that join will be called from different thread. More... | |
Details of SObjectizer run-time implementations.
using so_5::impl::internal_state_listener_unique_ptr_t = typedef std::unique_ptr< agent_state_listener_t, void (*)(agent_state_listener_t *) > |
Name of unique-ptr to be used inside SObjectizer.
Internal unique-ptr to agent_state_listener_t should have a custom deleter. It allows to use the same unique_ptr for destroyable and non-destroyable listeners.
using so_5::impl::limitful_mpsc_mbox_with_tracing_t = typedef mpsc_mbox_template_t< msg_tracing_helpers::tracing_enabled_base, mpsc_mbox_message_limits_usage_t::use > |
Alias for mpsc_mbox with message delivery tracing and message limits.
using so_5::impl::limitful_mpsc_mbox_without_tracing_t = typedef mpsc_mbox_template_t< msg_tracing_helpers::tracing_disabled_base, mpsc_mbox_message_limits_usage_t::use > |
Alias for mpsc_mbox without message delivery tracing and message limits.
using so_5::impl::limitless_mpsc_mbox_with_tracing_t = typedef mpsc_mbox_template_t< msg_tracing_helpers::tracing_enabled_base, mpsc_mbox_message_limits_usage_t::dont_use > |
Alias for mpsc_mbox with message delivery tracing and without message limits.
using so_5::impl::limitless_mpsc_mbox_without_tracing_t = typedef mpsc_mbox_template_t< msg_tracing_helpers::tracing_disabled_base, mpsc_mbox_message_limits_usage_t::dont_use > |
Alias for mpsc_mbox without message delivery tracing and without message limits.
using so_5::impl::local_mbox_with_tracing = typedef local_mbox_template< msg_tracing_helpers::tracing_enabled_base > |
Alias for local mbox with message delivery tracing.
using so_5::impl::local_mbox_without_tracing = typedef local_mbox_template< msg_tracing_helpers::tracing_disabled_base > |
Alias for local mbox without message delivery tracing.
using so_5::impl::so_layer_list_t = typedef std::vector< typed_layer_ref_t > |
Typedef for typed_layer_ret container.
using so_5::impl::subscription_storage_unique_ptr_t = typedef std::unique_ptr< subscription_storage_t > |
Typedef for unique pointer to subscription_storage object.
|
strong |
void so_5::impl::call_shutdown | ( | typed_layer_ref_t & | tl | ) |
void so_5::impl::call_wait | ( | typed_layer_ref_t & | tl | ) |
|
inline |
Helper function to be used for extraction of lock_factory for MPSC queues.
|
inline |
Ensures that join will be called from different thread.
It's a mistake if thread::join() is called from the context of thread to be joined. Unfortunately, different implementations of stdlib work differently. There can be an exception. Or there can be deadlock, or there can be memory damage.
It is better to check for that error manually and throw an exception if the error is detected.
mchain_t so_5::impl::make_mchain | ( | outliving_reference_t< so_5::msg_tracing::holder_t > | tracer, |
const mchain_params_t & | params, | ||
A &&... | args | ||
) |
Helper function for creation of a new mchain with respect to message tracing.
This function was in mbox_core.cpp file until v.5.7.0 and is placed in a separate header file in v.5.7.0.
Q | type of demand queue to be used for new mchain. |
A | type of arguments for mchain_template constructor. |
|
noexcept |
Processor of unhandled exception from agent's event handler.
working_thread_id | ID of working thread for the problematic agent. NULL thread id means that agent is multithreadded. For such cases only subset of exception_reaction is allowed (ignore_exception, abort_on_exception). |
ex | Raised and caught exception. |
a_exception_producer | Agent who is the producer of the exception. |
|
noexcept |
Processor of unhandled exception of unknown type from agent's event handler.
working_thread_id | ID of working thread for the problematic agent. NULL thread id means that agent is multithreadded. For such cases only subset of exception_reaction is allowed (ignore_exception, abort_on_exception). |
a_exception_producer | Agent who is the producer of the exception. |
void so_5::impl::run_stage | ( | const std::string & | stage_name, |
Init_Fn && | init_fn, | ||
Deinit_Fn && | deinit_fn, | ||
Next_Stage && | next_stage | ||
) |
Helper template function for doing initialization phase with rollback on failure.
|
inline |
Find layer in container.
void so_5::impl::wrap_init_fn_call | ( | Init_Fn | init_fn | ) |
A special wrapper for calling init function.
This wrapper calls init function and catch exception. If an exception is derived from std::exception it will be rethrown. If an exception is caught by catch(...) statement then an instance of so_5::exception_t will be thrown instead of caught exception.