SObjectizer 5.8
Loading...
Searching...
No Matches
so_5::environment_params_t Class Reference

Parameters for the SObjectizer Environment initialization. More...

#include <environment.hpp>

Public Types

using default_disp_params_t
 A sum type for holding parameters for the default disp.
 

Public Member Functions

 environment_params_t ()
 Constructor.
 
 environment_params_t (environment_params_t &&other)
 Move constructor.
 
 ~environment_params_t ()
 
environment_params_toperator= (environment_params_t &&other) noexcept
 Move operator.
 
environment_params_ttimer_thread (so_5::timer_thread_factory_t factory)
 Set the timer_thread factory.
 
template<class SO_Layer >
environment_params_tadd_layer (std::unique_ptr< SO_Layer > layer_ptr)
 Add an additional layer to the SObjectizer Environment.
 
environment_params_tcoop_listener (coop_listener_unique_ptr_t coop_listener)
 Set cooperation listener object.
 
environment_params_tevent_exception_logger (event_exception_logger_unique_ptr_t logger)
 Set exception logger object.
 
environment_params_tdisable_autoshutdown ()
 Do not shutdown SO Environment when it is becomes empty.
 
bool autoshutdown_disabled () const
 Is autoshutdown disabled?
 
environment_params_terror_logger (error_logger_shptr_t logger)
 Set error logger for the environment.
 
environment_params_tmessage_delivery_tracer (so_5::msg_tracing::tracer_unique_ptr_t tracer)
 Set message delivery tracer for the environment.
 
environment_params_tmessage_delivery_tracer_filter (so_5::msg_tracing::filter_shptr_t filter)
 Set message tracer filter for the environment.
 
environment_params_tdefault_disp_params (so_5::disp::one_thread::disp_params_t params)
 Set parameters for a case when one_thread-disp must be used as the default dispatcher.
 
environment_params_tdefault_disp_params (so_5::disp::nef_one_thread::disp_params_t params)
 Set parameters for a case when nef_one_thread-disp must be used as the default dispatcher.
 
const default_disp_params_tdefault_disp_params () const
 Get the parameters for the default dispatcher.
 
environment_params_twork_thread_activity_tracking (work_thread_activity_tracking_t flag)
 Set activity tracking flag for the whole SObjectizer Environment.
 
work_thread_activity_tracking_t work_thread_activity_tracking () const
 Get activity tracking flag for the whole SObjectizer Environment.
 
environment_params_tturn_work_thread_activity_tracking_on ()
 Helper for turning work thread activity tracking on.
 
environment_params_tturn_work_thread_activity_tracking_off ()
 Helper for turning work thread activity tracking off.
 
environment_params_tqueue_locks_defaults_manager (queue_locks_defaults_manager_unique_ptr_t manager)
 Set manager for queue locks defaults.
 
const environment_infrastructure_factory_tinfrastructure_factory () const
 Get the current environment infrastructure factory.
 
environment_params_tinfrastructure_factory (environment_infrastructure_factory_t factory)
 Set new environment infrastructure factory.
 
void event_queue_hook (event_queue_hook_unique_ptr_t hook)
 Set event_queue_hook object.
 
environment_params_twork_thread_factory (so_5::disp::abstract_work_thread_factory_shptr_t factory)
 Set work thread factory to be used by default.
 
environment_params_tdefault_subscription_storage_factory (subscription_storage_factory_t factory)
 Set subscription storage factory to be used by default.
 
const subscription_storage_factory_tdefault_subscription_storage_factory () const noexcept
 Get the current default subscription storage factory.
 
Exception reaction flag management methods.
exception_reaction_t exception_reaction () const noexcept
 Get exception reaction flag value.
 
environment_params_texception_reaction (exception_reaction_t value) noexcept
 Set exception reaction flag value.
 
Methods for internal use only.
layer_map_t so5_giveout_layers_map ()
 Get map of default SObjectizer's layers.
 
coop_listener_unique_ptr_t so5_giveout_coop_listener ()
 Get cooperation listener.
 
event_exception_logger_unique_ptr_t so5_giveout_event_exception_logger ()
 Get exception logger.
 
so_5::timer_thread_factory_t so5_giveout_timer_thread_factory ()
 Get the timer_thread factory.
 
const error_logger_shptr_tso5_error_logger () const
 Get error logger for the environment.
 
so_5::msg_tracing::tracer_unique_ptr_t so5_giveout_message_delivery_tracer ()
 Get message delivery tracer for the environment.
 
so_5::msg_tracing::filter_shptr_t so5_giveout_message_delivery_tracer_filter ()
 Get message delivery tracer filter for the environment.
 
queue_locks_defaults_manager_unique_ptr_t so5_giveout_queue_locks_defaults_manager ()
 Take out queue locks defaults manager.
 
event_queue_hook_unique_ptr_t so5_giveout_event_queue_hook ()
 Take out event_queue_hook object.
 
so_5::disp::abstract_work_thread_factory_shptr_t so5_giveout_work_thread_factory ()
 Take out work_thread_factory object.
 

Private Member Functions

void add_layer (const std::type_index &type, layer_unique_ptr_t layer_ptr)
 Add an additional layer.
 

Private Attributes

so_5::timer_thread_factory_t m_timer_thread_factory
 Timer thread factory.
 
layer_map_t m_so_layers
 Additional layers.
 
coop_listener_unique_ptr_t m_coop_listener
 Cooperation listener.
 
event_exception_logger_unique_ptr_t m_event_exception_logger
 Exception logger.
 
exception_reaction_t m_exception_reaction
 Exception reaction flag for the whole SO Environment.
 
bool m_autoshutdown_disabled
 Is autoshutdown when there is no more cooperation disabled?
 
error_logger_shptr_t m_error_logger
 Error logger for the environment.
 
so_5::msg_tracing::tracer_unique_ptr_t m_message_delivery_tracer
 Tracer for message delivery.
 
so_5::msg_tracing::filter_shptr_t m_message_delivery_tracer_filter
 Message delivery tracer filter to be used with environment.
 
default_disp_params_t m_default_disp_params
 Parameters for the default dispatcher.
 
work_thread_activity_tracking_t m_work_thread_activity_tracking
 Work thread activity tracking for the whole Environment.
 
queue_locks_defaults_manager_unique_ptr_t m_queue_locks_defaults_manager
 Manager for defaults of queue locks.
 
environment_infrastructure_factory_t m_infrastructure_factory
 A factory for environment infrastructure entity.
 
event_queue_hook_unique_ptr_t m_event_queue_hook
 An event_queue_hook object.
 
so_5::disp::abstract_work_thread_factory_shptr_t m_work_thread_factory
 Global factory for work threads.
 
subscription_storage_factory_t m_default_subscription_storage_factory
 Default subscription storage factory.
 

Friends

SO_5_FUNC void swap (environment_params_t &a, environment_params_t &b)
 Swap operation.
 

Detailed Description

Member Typedef Documentation

◆ default_disp_params_t

Initial value:
std::variant<
disp::one_thread::disp_params_t,
disp::nef_one_thread::disp_params_t
>

A sum type for holding parameters for the default disp.

Since
v.5.8.0

Definition at line 105 of file environment.hpp.

Constructor & Destructor Documentation

◆ environment_params_t() [1/2]

so_5::environment_params_t::environment_params_t ( )

Constructor.

Sets default values for parameters.

Definition at line 35 of file environment.cpp.

◆ environment_params_t() [2/2]

so_5::environment_params_t::environment_params_t ( environment_params_t && other)

Move constructor.

Since
v.5.2.3

Definition at line 48 of file environment.cpp.

◆ ~environment_params_t()

so_5::environment_params_t::~environment_params_t ( )

Definition at line 71 of file environment.cpp.

Member Function Documentation

◆ add_layer() [1/2]

void so_5::environment_params_t::add_layer ( const std::type_index & type,
layer_unique_ptr_t layer_ptr )
private

Add an additional layer.

If this layer is already added it will be replaced by layer_ptr.

The method distinguishes layers from each other by the type SO_LAYER.

Parameters
typeType identification for layer.
layer_ptrA layer to be added.

Definition at line 143 of file environment.cpp.

◆ add_layer() [2/2]

template<class SO_Layer >
environment_params_t & so_5::environment_params_t::add_layer ( std::unique_ptr< SO_Layer > layer_ptr)
inline

Add an additional layer to the SObjectizer Environment.

If this layer is already added it will be replaced by layer_ptr.

The method distinguishes layers from each other by the type SO_LAYER.

Parameters
layer_ptrA layer to be added.

Definition at line 158 of file environment.hpp.

◆ autoshutdown_disabled()

bool so_5::environment_params_t::autoshutdown_disabled ( ) const
inlinenodiscard

Is autoshutdown disabled?

See also
disable_autoshutdown()
Since
v.5.4.0

Definition at line 259 of file environment.hpp.

◆ coop_listener()

environment_params_t & so_5::environment_params_t::coop_listener ( coop_listener_unique_ptr_t coop_listener)

Set cooperation listener object.

Examples
so_5/coop_listener/main.cpp.

Definition at line 125 of file environment.cpp.

◆ default_disp_params() [1/3]

const default_disp_params_t & so_5::environment_params_t::default_disp_params ( void ) const
inline

Get the parameters for the default dispatcher.

Attention
The returned reference will be invalidated by any subsequent calls to default_disp_params-setters.
Note
Since v.5.8.0 it returns a sum type with parameters for different types of dispatchers. Therefore, the returned value has to be examined accordingly, for example:
const auto & disp_params = params.default_disp_params();
if( const auto * one_thread =
std::get_if< so_5::disp::one_thread::disp_params_t >( &disp_params ) )
{
... // Handling.
}
else if( const auto * nef_one_thread =
std::get_if< so_5::disp::nef_one_thread::disp_params_t >( &disp_params ) )
{
... // Handling.
}
Parameters for the SObjectizer Environment initialization.
environment_params_t & default_disp_params(so_5::disp::one_thread::disp_params_t params)
Set parameters for a case when one_thread-disp must be used as the default dispatcher.
Since
v.5.5.10

Definition at line 399 of file environment.hpp.

◆ default_disp_params() [2/3]

environment_params_t & so_5::environment_params_t::default_disp_params ( so_5::disp::nef_one_thread::disp_params_t params)
inline

Set parameters for a case when nef_one_thread-disp must be used as the default dispatcher.

Usage example:
so_5::launch( []( so_5::environment_t & env ) { ... },
[]( so_5::environment_params_t & env_params ) {
using namespace so_5::disp::nef_one_thread;
// Event queue for the default dispatcher must use mutex as lock.
env_params.default_disp_params( disp_params_t{}.tune_queue_params(
[]( queue_traits::queue_params_t & queue_params ) {
} ) );
} );
Container for storing parameters for MPSC queue.
queue_params_t & lock_factory(lock_factory_t factory)
Setter for lock factory.
Alias for namespace with traits of event queue.
disp_params_t & tune_queue_params(L tunner)
Tuner for queue parameters.
SObjectizer Environment.
SO_5_FUNC lock_factory_t simple_lock_factory()
Factory for creation of very simple implementation based on usage of mutex and condition_variable onl...
void launch(Init_Routine &&init_routine)
Launch a SObjectizer Environment with default parameters.
Definition api.hpp:142
Note
If some parameters have already been set, the old parameters will be replaced by new ones.
Since
v.5.8.0

Definition at line 364 of file environment.hpp.

◆ default_disp_params() [3/3]

environment_params_t & so_5::environment_params_t::default_disp_params ( so_5::disp::one_thread::disp_params_t params)
inline

Set parameters for a case when one_thread-disp must be used as the default dispatcher.

Usage example:
so_5::launch( []( so_5::environment_t & env ) { ... },
[]( so_5::environment_params_t & env_params ) {
using namespace so_5::disp::one_thread;
// Event queue for the default dispatcher must use mutex as lock.
env_params.default_disp_params( disp_params_t{}.tune_queue_params(
[]( queue_traits::queue_params_t & queue_params ) {
} ) );
} );
Alias for namespace with traits of event queue.
disp_params_t & tune_queue_params(L tunner)
Tuner for queue parameters.
Dispatcher with single working thread.
Note
If some parameters have already been set, the old parameters will be replaced by new ones.
Since
v.5.5.10

Definition at line 334 of file environment.hpp.

◆ default_subscription_storage_factory() [1/2]

const subscription_storage_factory_t & so_5::environment_params_t::default_subscription_storage_factory ( ) const
inlinenodiscardnoexcept

Get the current default subscription storage factory.

Note
This can be null (empty factory) if the factory isn't set explicitly.
Since
v.5.8.2

Definition at line 660 of file environment.hpp.

◆ default_subscription_storage_factory() [2/2]

environment_params_t & so_5::environment_params_t::default_subscription_storage_factory ( subscription_storage_factory_t factory)
inline

Set subscription storage factory to be used by default.

Usage example:

params.default_subscription_storage_factory(
} );
SO_5_FUNC subscription_storage_factory_t flat_set_based_subscription_storage_factory(std::size_t initial_capacity)
Factory for subscription storage based on sorted std::vector.
Note
The factory can be null (empty). This can be useful if there is a need to drop the previous value. For example:
void tune_env_params(so_5::environment_params_t & params) {
... // Some settings.
... // Some more settings.
}
...
so_5::launch( [](so_5::environment_t & env) {...},
// The main settings.
tune_env_params(params);
#if !defined(NDEBUG)
// Have to drop some settings in the Debug mode.
#endif
} );
environment_params_t & default_subscription_storage_factory(subscription_storage_factory_t factory)
Set subscription storage factory to be used by default.
Since
v.5.8.2

Definition at line 643 of file environment.hpp.

◆ disable_autoshutdown()

environment_params_t & so_5::environment_params_t::disable_autoshutdown ( )
inline

Do not shutdown SO Environment when it is becomes empty.

Description
Since v.5.4.0 SO Environment checks count of live cooperations after every cooperation deregistration. If there is no more live cooperations then SO Environment will be shutted down. If it is not appropriate then this method must be called. It disables autoshutdown of SO Environment. Event if there is no more live cooperations SO Environment will work until explicit call to environment_t::stop() method.
Since
v.5.4.0

Definition at line 244 of file environment.hpp.

◆ error_logger()

environment_params_t & so_5::environment_params_t::error_logger ( error_logger_shptr_t logger)
inline

Set error logger for the environment.

Since
v.5.5.0

Definition at line 270 of file environment.hpp.

◆ event_exception_logger()

environment_params_t & so_5::environment_params_t::event_exception_logger ( event_exception_logger_unique_ptr_t logger)

Set exception logger object.

Definition at line 133 of file environment.cpp.

◆ event_queue_hook()

void so_5::environment_params_t::event_queue_hook ( event_queue_hook_unique_ptr_t hook)
inline

Set event_queue_hook object.

Since v.5.5.24 it is possible to use special event_queue_hook object. If it is used it should be set for SObjectizer Environment before the Environment will be started. This method allows to specify event_queue_hook object for a new Environment object.

Usage example:

[](so_5::environment_t & env) {...}, // Some stating actions.
// Set my own event_queue hook object.
// Object is created dynamically and should be
// destroyed the normal way.
arg1, arg3, arg3 // and all other arguments for my_hook's constructor.
);
});
static void default_deleter(event_queue_hook_t *what) noexcept
An implementation of deleter that use operator delete for destroying object of type event_queue_hook.
event_queue_hook_unique_ptr_t make_event_queue_hook(event_queue_hook_deleter_fnptr_t deleter, Args &&...args)
Helper function for simplify creation of event_queue_hook object.
Note
The previous event_queue_hook object (if it was set earlier) will just be dropped.
Since
v.5.5.24

Definition at line 528 of file environment.hpp.

◆ exception_reaction() [1/2]

exception_reaction_t so_5::environment_params_t::exception_reaction ( ) const
inlinenoexcept

Get exception reaction flag value.

Note
This method is noexcept since v.5.8.0.
Since
v.5.3.0

Definition at line 197 of file environment.hpp.

◆ exception_reaction() [2/2]

environment_params_t & so_5::environment_params_t::exception_reaction ( exception_reaction_t value)
inlinenoexcept

Set exception reaction flag value.

Usage example:

...
});
@ shutdown_sobjectizer_on_exception
Definition agent.hpp:70
Note
This method is noexcept since v.5.8.0.
Since
v.5.3.0

Definition at line 220 of file environment.hpp.

◆ infrastructure_factory() [1/2]

const environment_infrastructure_factory_t & so_5::environment_params_t::infrastructure_factory ( ) const
inline

Get the current environment infrastructure factory.

Since
v.5.5.19
Examples
so_5/wrapped_env_demo_3/main.cpp.

Definition at line 467 of file environment.hpp.

◆ infrastructure_factory() [2/2]

environment_params_t & so_5::environment_params_t::infrastructure_factory ( environment_infrastructure_factory_t factory)
inline

Set new environment infrastructure factory.

Usage example:

... // Some initial actions.
},
[]( so_5::environment_params_t & params ) {
// Set infrastructure factory to make simple not-thread-safe
// single-threaded infrastructure.
params.infrastructure_factory(
} );
environment_infrastructure_factory_t factory()
A factory for creation of simple not-thread-safe single-thread environment infrastructure object with...
Since
v.5.5.19

Definition at line 490 of file environment.hpp.

◆ message_delivery_tracer()

environment_params_t & so_5::environment_params_t::message_delivery_tracer ( so_5::msg_tracing::tracer_unique_ptr_t tracer)
inline

Set message delivery tracer for the environment.

Usage example:

so_5::launch( [](so_5::environment_t & env) { ... },
params.message_delivery_tracer( so_5::msg_tracing::std_cout_tracer() );
...
} );
SO_5_FUNC tracer_unique_ptr_t std_cout_tracer()
Factory for tracer which uses std::cout stream.
Since
v.5.5.9

Definition at line 291 of file environment.hpp.

◆ message_delivery_tracer_filter()

environment_params_t & so_5::environment_params_t::message_delivery_tracer_filter ( so_5::msg_tracing::filter_shptr_t filter)
inline

Set message tracer filter for the environment.

Since
v.5.5.22

Definition at line 303 of file environment.hpp.

◆ operator=()

environment_params_t & so_5::environment_params_t::operator= ( environment_params_t && other)
noexcept

Move operator.

Since
v.5.2.3

Definition at line 76 of file environment.cpp.

◆ queue_locks_defaults_manager()

environment_params_t & so_5::environment_params_t::queue_locks_defaults_manager ( queue_locks_defaults_manager_unique_ptr_t manager)
inline

Set manager for queue locks defaults.

Since
v.5.5.18

Definition at line 455 of file environment.hpp.

◆ so5_error_logger()

const error_logger_shptr_t & so_5::environment_params_t::so5_error_logger ( ) const
inline

Get error logger for the environment.

Definition at line 700 of file environment.hpp.

◆ so5_giveout_coop_listener()

coop_listener_unique_ptr_t so_5::environment_params_t::so5_giveout_coop_listener ( )
inline

Get cooperation listener.

Definition at line 679 of file environment.hpp.

◆ so5_giveout_event_exception_logger()

event_exception_logger_unique_ptr_t so_5::environment_params_t::so5_giveout_event_exception_logger ( )
inline

Get exception logger.

Definition at line 686 of file environment.hpp.

◆ so5_giveout_event_queue_hook()

event_queue_hook_unique_ptr_t so_5::environment_params_t::so5_giveout_event_queue_hook ( )
inline

Take out event_queue_hook object.

Since
v.5.5.24

Definition at line 742 of file environment.hpp.

◆ so5_giveout_layers_map()

layer_map_t so_5::environment_params_t::so5_giveout_layers_map ( )
inlinenodiscard

Get map of default SObjectizer's layers.

Definition at line 672 of file environment.hpp.

◆ so5_giveout_message_delivery_tracer()

so_5::msg_tracing::tracer_unique_ptr_t so_5::environment_params_t::so5_giveout_message_delivery_tracer ( )
inline

Get message delivery tracer for the environment.

Since
v.5.5.9

Definition at line 711 of file environment.hpp.

◆ so5_giveout_message_delivery_tracer_filter()

so_5::msg_tracing::filter_shptr_t so_5::environment_params_t::so5_giveout_message_delivery_tracer_filter ( )
inline

Get message delivery tracer filter for the environment.

Since
v.5.5.22

Definition at line 722 of file environment.hpp.

◆ so5_giveout_queue_locks_defaults_manager()

queue_locks_defaults_manager_unique_ptr_t so_5::environment_params_t::so5_giveout_queue_locks_defaults_manager ( )
inline

Take out queue locks defaults manager.

Since
v.5.5.18

Definition at line 732 of file environment.hpp.

◆ so5_giveout_timer_thread_factory()

so_5::timer_thread_factory_t so_5::environment_params_t::so5_giveout_timer_thread_factory ( )
inline

Get the timer_thread factory.

Definition at line 693 of file environment.hpp.

◆ so5_giveout_work_thread_factory()

so_5::disp::abstract_work_thread_factory_shptr_t so_5::environment_params_t::so5_giveout_work_thread_factory ( )
inline

Take out work_thread_factory object.

Since
v.5.7.3

Definition at line 752 of file environment.hpp.

◆ timer_thread()

environment_params_t & so_5::environment_params_t::timer_thread ( so_5::timer_thread_factory_t factory)

Set the timer_thread factory.

If factory is a null then the default timer thread will be used.

Parameters
factorytimer_thread factory to be used.

Definition at line 117 of file environment.cpp.

◆ turn_work_thread_activity_tracking_off()

environment_params_t & so_5::environment_params_t::turn_work_thread_activity_tracking_off ( )
inline

Helper for turning work thread activity tracking off.

Since
v.5.5.18

Definition at line 444 of file environment.hpp.

◆ turn_work_thread_activity_tracking_on()

environment_params_t & so_5::environment_params_t::turn_work_thread_activity_tracking_on ( )
inline

Helper for turning work thread activity tracking on.

Since
v.5.5.18

Definition at line 433 of file environment.hpp.

◆ work_thread_activity_tracking() [1/2]

work_thread_activity_tracking_t so_5::environment_params_t::work_thread_activity_tracking ( ) const
inline

Get activity tracking flag for the whole SObjectizer Environment.

Since
v.5.5.18

Definition at line 423 of file environment.hpp.

◆ work_thread_activity_tracking() [2/2]

environment_params_t & so_5::environment_params_t::work_thread_activity_tracking ( work_thread_activity_tracking_t flag)
inline

Set activity tracking flag for the whole SObjectizer Environment.

Since
v.5.5.18

Definition at line 410 of file environment.hpp.

◆ work_thread_factory()

environment_params_t & so_5::environment_params_t::work_thread_factory ( so_5::disp::abstract_work_thread_factory_shptr_t factory)
inline

Set work thread factory to be used by default.

Since v.5.7.3 it's possible to use custom worker threads instead of standard ones provided by SObjectizer. To do so it's required to provide an appropriate worker thread factory. It can be done by specifying a factory in parameters for a dispatcher. Or it can be done globally for the whole SObjectizer's Environment by this method.

This method sets a global factory that will be used by default. It means that:

  • the global factory won't be used if there is a factory in dispatcher's parameters (in that case dispatcher's factory has higher priority and the default factory is ignored);
  • the global factory will be used if there is no factory specified in dispatcher's parameters;
  • the global factory will be used for the default one_thread dispatcher created by default multi-thread environment infrastructure.

Usage example:

class my_thread_factory final : public so_5::disp::abstract_work_thread_factory_t
{
...
};
...
so_5::launch( [](so_5::environment_t & env) {
env.introduce_coop( [](so_5::coop_t & coop) {
// This agent will be bound to the default dispatcher.
// Worker thread for the default dispatcher will be provided
// by default factory.
coop.make_agent<my_agent>(...);
// This agent will be bound to an instance of new one_thread
// dispatcher. A worker thread for that new dispatcher will
// be provided by the default factory.
coop.make_agent_with_binder<my_agent>(
...);
// This dispatcher will use another own instance of
// thread factory.
coop.environment(),
"my_pool_disp",
.work_thread_factory(std::make_shared<my_thread_factory>(...)) );
// This agent will be bound to the new thread_pool dispatcher
// and will work on a thread provided by a separate thread factory.
coop.make_agent_with_binder<my_agent>(tp_disp.binder());
} );
...
},
params.work_thread_factory( std::make_shared<my_thread_factory>(...) );
} );
Agent cooperation.
Definition coop.hpp:389
environment_t & environment() const noexcept
Access to SO Environment for which cooperation is bound.
Definition coop.hpp:453
Agent * make_agent_with_binder(so_5::disp_binder_shptr_t binder, Args &&... args)
Helper method for simplification of agents creation and binding to the specified dispatcher.
Definition coop.hpp:827
Agent * make_agent(Args &&... args)
Helper method for simplification of agents creation.
Definition coop.hpp:792
An interface of factory for management of worker threads.
disp_binder_shptr_t binder() const noexcept
Get a binder for that dispatcher.
abstract_work_thread_factory_shptr_t work_thread_factory() const noexcept
Getter for work thread factory.
Alias for namespace with traits of event queue.
disp_params_t & thread_count(std::size_t count)
Setter for thread count.
decltype(auto) introduce_coop(Args &&... args)
Helper method for simplification of cooperation creation and registration.
SO_5_FUNC dispatcher_handle_t make_dispatcher(environment_t &env, const std::string_view data_sources_name_base, disp_params_t params)
Create an instance of one_thread dispatcher.
SO_5_FUNC dispatcher_handle_t make_dispatcher(environment_t &env, const std::string_view data_sources_name_base, disp_params_t params)
Create an instance thread_pool dispatcher.
Since
v.5.7.3

Definition at line 597 of file environment.hpp.

Friends And Related Symbol Documentation

◆ swap

SO_5_FUNC void swap ( environment_params_t & a,
environment_params_t & b )
friend

Swap operation.

Since
v.5.2.3

Definition at line 85 of file environment.cpp.

Member Data Documentation

◆ m_autoshutdown_disabled

bool so_5::environment_params_t::m_autoshutdown_disabled
private

Is autoshutdown when there is no more cooperation disabled?

See also
disable_autoshutdown()
Since
v.5.4.0

Definition at line 800 of file environment.hpp.

◆ m_coop_listener

coop_listener_unique_ptr_t so_5::environment_params_t::m_coop_listener
private

Cooperation listener.

Definition at line 781 of file environment.hpp.

◆ m_default_disp_params

default_disp_params_t so_5::environment_params_t::m_default_disp_params
private

Parameters for the default dispatcher.

Since
v.5.5.10

Definition at line 828 of file environment.hpp.

◆ m_default_subscription_storage_factory

subscription_storage_factory_t so_5::environment_params_t::m_default_subscription_storage_factory
private

Default subscription storage factory.

This factory will be used by default if a specific factory isn't set for agent explicitly.

Note
It can be a nullptr. It means that standard default subscription storage factory has to be used as the global factory.
Since
v.5.8.2

Definition at line 885 of file environment.hpp.

◆ m_error_logger

error_logger_shptr_t so_5::environment_params_t::m_error_logger
private

Error logger for the environment.

Since
v.5.5.0

Definition at line 807 of file environment.hpp.

◆ m_event_exception_logger

event_exception_logger_unique_ptr_t so_5::environment_params_t::m_event_exception_logger
private

Exception logger.

Definition at line 784 of file environment.hpp.

◆ m_event_queue_hook

event_queue_hook_unique_ptr_t so_5::environment_params_t::m_event_queue_hook
private

An event_queue_hook object.

Note
It can be a nullptr. It means that no event_queue_hook should be used.
Since
v.5.5.24

Definition at line 860 of file environment.hpp.

◆ m_exception_reaction

exception_reaction_t so_5::environment_params_t::m_exception_reaction
private

Exception reaction flag for the whole SO Environment.

Since
v.5.3.0

Definition at line 791 of file environment.hpp.

◆ m_infrastructure_factory

environment_infrastructure_factory_t so_5::environment_params_t::m_infrastructure_factory
private

A factory for environment infrastructure entity.

Since
v.5.5.19

Definition at line 849 of file environment.hpp.

◆ m_message_delivery_tracer

so_5::msg_tracing::tracer_unique_ptr_t so_5::environment_params_t::m_message_delivery_tracer
private

Tracer for message delivery.

Since
v.5.5.9

Definition at line 814 of file environment.hpp.

◆ m_message_delivery_tracer_filter

so_5::msg_tracing::filter_shptr_t so_5::environment_params_t::m_message_delivery_tracer_filter
private

Message delivery tracer filter to be used with environment.

Since
v.5.5.22

Definition at line 821 of file environment.hpp.

◆ m_queue_locks_defaults_manager

queue_locks_defaults_manager_unique_ptr_t so_5::environment_params_t::m_queue_locks_defaults_manager
private

Manager for defaults of queue locks.

Since
v.5.5.18

Definition at line 842 of file environment.hpp.

◆ m_so_layers

layer_map_t so_5::environment_params_t::m_so_layers
private

Additional layers.

Definition at line 778 of file environment.hpp.

◆ m_timer_thread_factory

so_5::timer_thread_factory_t so_5::environment_params_t::m_timer_thread_factory
private

Timer thread factory.

Definition at line 775 of file environment.hpp.

◆ m_work_thread_activity_tracking

work_thread_activity_tracking_t so_5::environment_params_t::m_work_thread_activity_tracking
private

Work thread activity tracking for the whole Environment.

Since
v.5.5.18

Definition at line 835 of file environment.hpp.

◆ m_work_thread_factory

so_5::disp::abstract_work_thread_factory_shptr_t so_5::environment_params_t::m_work_thread_factory
private

Global factory for work threads.

Note
It can be a nullptr. It means that standard work thread factory has to be used as the global factory.
Since
v.5.7.3

Definition at line 871 of file environment.hpp.


The documentation for this class was generated from the following files: