SObjectizer  5.5
Namespaces | Classes | Typedefs | Functions
so_5::disp::prio_one_thread::quoted_round_robin Namespace Reference

Dispatcher which handles events of different priorities in round-robin maner. More...

Namespaces

 impl
 Implementation details for dispatcher with round-robin policy of handling prioritized events.
 

Classes

class  disp_params_t
 Alias for namespace with traits of event queue. More...
 
class  private_dispatcher_t
 An interface for quoted_round_robin private dispatcher. More...
 
class  quotes_t
 A storage of quotes for priorities. More...
 

Typedefs

using params_t = disp_params_t
 Old alias for disp_params for compatibility with previous versions. More...
 
using private_dispatcher_handle_t = so_5::intrusive_ptr_t< private_dispatcher_t >
 A handle for the quoted_round_robin private dispatcher. More...
 

Functions

SO_5_FUNC dispatcher_unique_ptr_t create_disp ( const quotes_t &quotes, disp_params_t params)
 Create an instance of dispatcher to be used as named dispatcher. More...
 
SO_5_FUNC private_dispatcher_handle_t create_private_disp ( environment_t &env, const quotes_t &quotes, const std::string &data_sources_name_base, disp_params_t params)
 Create a private quoted_round_robin dispatcher. More...
 
SO_5_FUNC disp_binder_unique_ptr_t create_disp_binder ( const std::string &disp_name)
 Create a dispatcher binder object. More...
 
dispatcher_unique_ptr_t create_disp (const quotes_t &quotes)
 Create a dispatcher. More...
 
private_dispatcher_handle_t create_private_disp (environment_t &env, const quotes_t &quotes, const std::string &data_sources_name_base)
 Create a private quoted_round_robin dispatcher. More...
 
private_dispatcher_handle_t create_private_disp (environment_t &env, const quotes_t &quotes)
 Create a private quoted_round_robin dispatcher. More...
 

Detailed Description

Dispatcher which handles events of different priorities in round-robin maner.

Since
v.5.5.8

Typedef Documentation

◆ params_t

Old alias for disp_params for compatibility with previous versions.

Deprecated:
Use disp_params_t instead.

◆ private_dispatcher_handle_t

A handle for the quoted_round_robin private dispatcher.

Since
v.5.5.8

Function Documentation

◆ create_disp() [1/2]

dispatcher_unique_ptr_t so_5::disp::prio_one_thread::quoted_round_robin::create_disp ( const quotes_t quotes)
inline

Create a dispatcher.

Parameters
quotesQuotes for every priority.

◆ create_disp() [2/2]

SO_5_FUNC dispatcher_unique_ptr_t so_5::disp::prio_one_thread::quoted_round_robin::create_disp ( const quotes_t quotes,
disp_params_t  params 
)

Create an instance of dispatcher to be used as named dispatcher.

Since
v.5.5.10
Parameters
quotesQuotes for every priority.
paramsParameters for dispatcher.

◆ create_disp_binder()

SO_5_FUNC disp_binder_unique_ptr_t so_5::disp::prio_one_thread::quoted_round_robin::create_disp_binder ( const std::string &  disp_name)

Create a dispatcher binder object.

Parameters
disp_nameName of the dispatcher to be bound to.

◆ create_private_disp() [1/3]

private_dispatcher_handle_t so_5::disp::prio_one_thread::quoted_round_robin::create_private_disp ( environment_t env,
const quotes_t quotes,
const std::string &  data_sources_name_base 
)
inline

Create a private quoted_round_robin dispatcher.

Since
v.5.5.8
Usage sample
auto common_thread_disp = create_private_disp(
env,
quotes_t{ 75 }.set( so_5::prio::p7, 150 ).set( so_5::prio::p6, 125 ),
"request_processor" );
auto coop = env.create_coop( so_5::autoname,
// The main dispatcher for that coop will be
// private quoted_round_robin dispatcher.
common_thread_disp->binder() );
Parameters
envSObjectizer Environment to work in.
quotesQuotes for every priority.
data_sources_name_baseValue for creating names of data sources for run-time monitoring.

◆ create_private_disp() [2/3]

private_dispatcher_handle_t so_5::disp::prio_one_thread::quoted_round_robin::create_private_disp ( environment_t env,
const quotes_t quotes 
)
inline

Create a private quoted_round_robin dispatcher.

Since
v.5.5.8
Usage sample
auto common_thread_disp = create_private_disp(
env,
quotes_t{ 75 }.set( so_5::prio::p7, 150 ).set( so_5::prio::p6, 125 ) );
auto coop = env.create_coop( so_5::autoname,
// The main dispatcher for that coop will be
// private quoted_round_robin dispatcher.
common_thread_disp->binder() );
Parameters
envSObjectizer Environment to work in.
quotesQuotes for every priority.

◆ create_private_disp() [3/3]

SO_5_FUNC private_dispatcher_handle_t so_5::disp::prio_one_thread::quoted_round_robin::create_private_disp ( environment_t env,
const quotes_t quotes,
const std::string &  data_sources_name_base,
disp_params_t  params 
)

Create a private quoted_round_robin dispatcher.

Since
v.5.5.10
Usage sample
auto common_thread_disp = create_private_disp(
env,
quotes_t{ 75 }.set( so_5::prio::p7, 150 ).set( so_5::prio::p6, 125 ) );
"request_processor",
} ) );
auto coop = env.create_coop( so_5::autoname,
// The main dispatcher for that coop will be
// private strictly_ordered dispatcher.
common_thread_disp->binder() );
Parameters
envSObjectizer Environment to work in.
quotesQuotes for every priority.
data_sources_name_baseValue for creating names of data sources for run-time monitoring.
paramsParameters for the dispatcher.
Examples:
so_5/news_board/main.cpp.