SObjectizer  5.5
Namespaces | Classes | Typedefs | Functions | Variables
so_5::message_limit::impl Namespace Reference

Internal implementation of message limits related stuff. More...

Namespaces

 anonymous_namespace{message_limit.cpp}
 
 anonymous_namespace{message_limit_internals.hpp}
 

Classes

class  action_msg_tracer_t
 An interface of tracer for message delivery tracing. More...
 
struct  call_pre_abort_action
 Helper class for calling pre-abort action. More...
 
struct  call_pre_abort_action_impl
 Helper class for calling pre-abort action. More...
 
struct  call_pre_abort_action_impl< false, M, L >
 Specialization for the case of signal. More...
 
struct  info_block_t
 Run-time data for limit of one message type. More...
 
class  info_storage_t
 A storage for message limits for one agent. More...
 
struct  transformed_message_maker
 A helper function to call appropriate constructor of resulting type in dependence of message or signal. More...
 
struct  transformed_message_maker< true, Result, Msg >
 A specialization of signal. More...
 

Typedefs

using info_block_container_t = std::vector< info_block_t >
 Type of container for limits' run-time data. More...
 

Functions

SO_5_FUNC void drop_message_reaction (const overlimit_context_t &ctx)
 Actual implementation of drop message reaction. More...
 
SO_5_FUNC void abort_app_reaction (const overlimit_context_t &ctx)
 Actual implementation of abort application reaction. More...
 
SO_5_FUNC void redirect_reaction ( const overlimit_context_t &ctx, const mbox_t &to)
 Actual implementation of redirect message reaction. More...
 
SO_5_FUNC void ensure_event_transform_reaction ( invocation_type_t invocation_type, const overlimit_context_t &ctx)
 Checks that service request will not be transformed. More...
 
SO_5_FUNC void transform_reaction ( const overlimit_context_t &ctx, const mbox_t &to, const std::type_index &msg_type, const message_ref_t &message)
 Actual implementation of transform reaction. More...
 
template<typename Lambda >
void try_to_deliver_to_agent (mbox_id_t mbox_id, invocation_type_t invocation_type, const agent_t &receiver, const control_block_t *limit, const std::type_index &msg_type, const message_ref_t &what_to_deliver, unsigned int overlimit_reaction_deep, const message_limit::impl::action_msg_tracer_t *tracer, Lambda delivery_action)
 A helper function for pushing a message or a service request to agent with respect to message limit. More...
 

Variables

const unsigned int max_overlimit_reaction_deep = 32
 Maximum overlimit reaction deep. More...
 

Detailed Description

Internal implementation of message limits related stuff.

Since
v.5.5.4

Typedef Documentation

◆ info_block_container_t

Type of container for limits' run-time data.

Since
v.5.5.4

Function Documentation

◆ abort_app_reaction()

SO_5_FUNC void so_5::message_limit::impl::abort_app_reaction ( const overlimit_context_t ctx)

Actual implementation of abort application reaction.

Since
v.5.5.4

◆ drop_message_reaction()

SO_5_FUNC void so_5::message_limit::impl::drop_message_reaction ( const overlimit_context_t ctx)

Actual implementation of drop message reaction.

Since
v.5.5.9

◆ ensure_event_transform_reaction()

SO_5_FUNC void so_5::message_limit::impl::ensure_event_transform_reaction ( invocation_type_t  invocation_type,
const overlimit_context_t ctx 
)

Checks that service request will not be transformed.

Since
v.5.5.4
Parameters
invocation_typeInvocation type to be checked.
ctxContext on which overlimit must be handled. This context is necessary to make description for exception to be thrown.

◆ redirect_reaction()

SO_5_FUNC void so_5::message_limit::impl::redirect_reaction ( const overlimit_context_t ctx,
const mbox_t to 
)

Actual implementation of redirect message reaction.

Since
v.5.5.4
Parameters
ctxContext on which overlimit must be handled.
toDestination for message redirection.

◆ transform_reaction()

SO_5_FUNC void so_5::message_limit::impl::transform_reaction ( const overlimit_context_t ctx,
const mbox_t to,
const std::type_index &  msg_type,
const message_ref_t message 
)

Actual implementation of transform reaction.

Since
v.5.5.4
Parameters
ctxContext on which overlimit must be handled.
toDestination for new message.
msg_typeType of new message.
messageAn instance of new message.

◆ try_to_deliver_to_agent()

template<typename Lambda >
void so_5::message_limit::impl::try_to_deliver_to_agent ( mbox_id_t  mbox_id,
invocation_type_t  invocation_type,
const agent_t receiver,
const control_block_t limit,
const std::type_index &  msg_type,
const message_ref_t what_to_deliver,
unsigned int  overlimit_reaction_deep,
const message_limit::impl::action_msg_tracer_t tracer,
Lambda  delivery_action 
)

A helper function for pushing a message or a service request to agent with respect to message limit.

Since
v.5.5.4
Template Parameters
Lambdalambda-function to do actual pushing.
Parameters
mbox_idMbox that is used for message delivery. Added in v.5.5.23 for support of enveloped messages.
invocation_typeIt is a message or service request?
receiverReceiver of the message or service request.
limitOptional message limit. Value nullptr means that there is no message limit to control.
msg_typeType of message to be delivered.
what_to_deliverMessage instance to be delivered.
overlimit_reaction_deepDeep of overlimit reactions recursion.
tracerMessage delivery tracer to be used inside overlimit reaction.
delivery_actionActual delivery action.

Variable Documentation

◆ max_overlimit_reaction_deep

const unsigned int so_5::message_limit::impl::max_overlimit_reaction_deep = 32

Maximum overlimit reaction deep.

Since
v.5.5.4