MySQL 8.0.40
Source Code Documentation
Message_service_handler Class Reference

Handles the deliver of recv service messages to subscribed modules. More...

#include <message_service.h>

Public Member Functions

 Message_service_handler ()
 Create a message service handler to deliver messages to recv subscribers. More...
 
virtual ~Message_service_handler ()
 
int initialize ()
 Initialize thread that will deliver messages. More...
 
void dispatcher ()
 Main loop that checks message availability. More...
 
int terminate ()
 Terminate delivering message thread. More...
 
void add (Group_service_message *message)
 Add to queue a new message to be deliver to recv service subscribers. More...
 
bool notify_message_service_recv (Group_service_message *service_message)
 It will notify recv subscribers with a service message. More...
 

Private Attributes

bool m_aborted
 Thread was terminated. More...
 
my_thread_handle m_message_service_pthd
 The current phase. More...
 
mysql_mutex_t m_message_service_run_lock
 The thread lock to control access. More...
 
mysql_cond_t m_message_service_run_cond
 The thread signal mechanism to be terminated. More...
 
thread_state m_message_service_thd_state
 The state of the thread. More...
 
Abortable_synchronized_queue< Group_service_message * > * m_incoming
 Queue with service message to be delivered. More...
 

Detailed Description

Handles the deliver of recv service messages to subscribed modules.

Constructor & Destructor Documentation

◆ Message_service_handler()

Message_service_handler::Message_service_handler ( )

Create a message service handler to deliver messages to recv subscribers.

◆ ~Message_service_handler()

Message_service_handler::~Message_service_handler ( )
virtual

Member Function Documentation

◆ add()

void Message_service_handler::add ( Group_service_message message)

Add to queue a new message to be deliver to recv service subscribers.

Parameters
[in]messagemessage to be delivered

◆ dispatcher()

void Message_service_handler::dispatcher ( )

Main loop that checks message availability.

◆ initialize()

int Message_service_handler::initialize ( )

Initialize thread that will deliver messages.

Returns
returns 0 if succeeds, error otherwise

◆ notify_message_service_recv()

bool Message_service_handler::notify_message_service_recv ( Group_service_message service_message)

It will notify recv subscribers with a service message.

Parameters
[in]service_messagemessage to process
Returns
false if message is delivered, true otherwise

◆ terminate()

int Message_service_handler::terminate ( )

Terminate delivering message thread.

Returns
returns 0 if succeeds, error otherwise

Member Data Documentation

◆ m_aborted

bool Message_service_handler::m_aborted
private

Thread was terminated.

◆ m_incoming

Abortable_synchronized_queue<Group_service_message *>* Message_service_handler::m_incoming
private

Queue with service message to be delivered.

◆ m_message_service_pthd

my_thread_handle Message_service_handler::m_message_service_pthd
private

The current phase.

◆ m_message_service_run_cond

mysql_cond_t Message_service_handler::m_message_service_run_cond
private

The thread signal mechanism to be terminated.

◆ m_message_service_run_lock

mysql_mutex_t Message_service_handler::m_message_service_run_lock
private

The thread lock to control access.

◆ m_message_service_thd_state

thread_state Message_service_handler::m_message_service_thd_state
private

The state of the thread.


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