|
SObjectizer
5.7
|
A multi-producer/single-consumer mbox definition. More...
#include <mpsc_mbox.hpp>
Public Member Functions | |
| template<typename... Tracing_Args> | |
| mpsc_mbox_template_t (mbox_id_t id, agent_t *single_consumer, Tracing_Args &&... tracing_args) | |
| mbox_id_t | id () const override |
| Unique ID of this mbox. More... | |
| void | subscribe_event_handler (const std::type_index &msg_type, const message_limit::control_block_t *limit, agent_t &subscriber) override |
| Add the message handler. More... | |
| void | unsubscribe_event_handlers (const std::type_index &msg_type, agent_t &subscriber) override |
| Remove all message handlers. More... | |
| std::string | query_name () const override |
| Get the mbox name. More... | |
| mbox_type_t | type () const override |
| Get the type of message box. More... | |
| void | do_deliver_message (const std::type_index &msg_type, const message_ref_t &message, unsigned int overlimit_reaction_deep) override |
| Deliver message for all subscribers with respect to message limits. More... | |
| void | set_delivery_filter (const std::type_index &msg_type, const delivery_filter_t &filter, agent_t &subscriber) override |
| Set a delivery filter for message type and subscriber. More... | |
| void | drop_delivery_filter (const std::type_index &msg_type, agent_t &subscriber) noexcept override |
| Removes delivery filter for message type and subscriber. More... | |
| environment_t & | environment () const noexcept override |
| SObjectizer Environment for which the mbox is created. More... | |
Protected Types | |
| using | subscription_info_t = local_mbox_details::basic_subscription_info_t |
| Information related to a subscribed message type. More... | |
| using | subscriptions_map_t = std::map< std::type_index, subscription_info_t > |
| Type of dictionary for information about the current subscriptions. More... | |
Protected Member Functions | |
| template<typename Info_Maker , typename Info_Changer > | |
| void | insert_or_modify_subscription (const std::type_index &msg_type, Info_Maker maker, Info_Changer changer) |
| Helper for performing insertion or modification of subscription info. More... | |
| template<typename Info_Changer > | |
| void | modify_and_remove_subscription_if_needed (const std::type_index &msg_type, Info_Changer changer) |
| Helper for modification and deletion of subscription info. More... | |
| template<typename L > | |
| void | do_delivery (const std::type_index &msg_type, const message_ref_t &message, typename Tracing_Base::deliver_op_tracer const &tracer, L l) |
| Helper method to do delivery actions under locked object. More... | |
Protected Member Functions inherited from so_5::atomic_refcounted_t | |
| atomic_refcounted_t (const atomic_refcounted_t &)=delete | |
| atomic_refcounted_t & | operator= (const atomic_refcounted_t &)=delete |
| atomic_refcounted_t () noexcept | |
| Default constructor. More... | |
| ~atomic_refcounted_t () noexcept=default | |
| Destructor. More... | |
| void | inc_ref_count () noexcept |
| Increments reference count. More... | |
| unsigned long | dec_ref_count () noexcept |
| Decrement reference count. More... | |
Protected Attributes | |
| const mbox_id_t | m_id |
| ID of this mbox. More... | |
| agent_t * | m_single_consumer |
| The only consumer of this mbox's messages. More... | |
| default_rw_spinlock_t | m_lock |
| Protection of object from modification. More... | |
| subscriptions_map_t | m_subscriptions |
| Information about the current subscriptions. More... | |
Private Types | |
| using | limits_selector_t = std::conditional_t< mpsc_mbox_message_limits_usage_t::use==message_limits_usage, mpsc_mbox_with_message_limits_t, mpsc_mbox_without_message_limits_t > |
Additional Inherited Members |
A multi-producer/single-consumer mbox definition.
|
private |
|
protected |
Information related to a subscribed message type.
|
protected |
Type of dictionary for information about the current subscriptions.
|
inline |
|
inlineoverridevirtual |
Deliver message for all subscribers with respect to message limits.
Implements so_5::abstract_message_box_t.
|
inlineprotected |
Helper method to do delivery actions under locked object.
| L | lambda with actual delivery actions. |
| msg_type | Type of message/signal to be delivered. |
| message | Message object to be delivered. |
| tracer | Tracer object to log the case of abscense of subscriptions. |
| l | Lambda with actual delivery actions. |
|
inlineoverridevirtualnoexcept |
Removes delivery filter for message type and subscriber.
Implements so_5::abstract_message_box_t.
|
inlineoverridevirtualnoexcept |
SObjectizer Environment for which the mbox is created.
Implements so_5::abstract_message_box_t.
|
inlineoverridevirtual |
|
inlineprotected |
Helper for performing insertion or modification of subscription info.
|
inlineprotected |
Helper for modification and deletion of subscription info.
|
inlineoverridevirtual |
Get the mbox name.
Implements so_5::abstract_message_box_t.
|
inlineoverridevirtual |
Set a delivery filter for message type and subscriber.
Implements so_5::abstract_message_box_t.
|
inlineoverridevirtual |
Add the message handler.
Implements so_5::abstract_message_box_t.
|
inlineoverridevirtual |
Get the type of message box.
Implements so_5::abstract_message_box_t.
|
inlineoverridevirtual |
Remove all message handlers.
Implements so_5::abstract_message_box_t.
|
protected |
ID of this mbox.
|
protected |
Protection of object from modification.
|
protected |
The only consumer of this mbox's messages.
|
protected |
Information about the current subscriptions.
1.8.14