MySQL 26.10.0
Source Code Documentation
DestinationNodesStateNotifier Class Reference

Allows the obervers to register for notifications on the change in the state of the destination nodes. More...

#include <destination_nodes_state_notifier.h>

Inheritance diagram for DestinationNodesStateNotifier:
[legend]

Public Member Functions

virtual ~DestinationNodesStateNotifier ()=default
 
AllowedNodesChangeCallbacksListIterator register_allowed_nodes_change_callback (const AllowedNodesChangedCallback &clb)
 Registers the callback for notification on the change in the state if the destination nodes. More...
 
void unregister_allowed_nodes_change_callback (const AllowedNodesChangeCallbacksListIterator &it)
 Unregisters the callback registered with register_allowed_nodes_change_callback(). More...
 
void register_refresh_router_socket_acceptor_state (const RefreshSocketAcceptorStateCallback &clb)
 Registers the callback for notification that the routing socket acceptor state may need to be refreshed. More...
 
void unregister_refresh_router_socket_acceptor_state ()
 Unregisters the callback registered with register_refresh_router_socket_acceptor_state(). More...
 
void register_md_refresh_callback (const MetadataRefreshCallback &callback)
 Registers a callback that is going to be used on metadata refresh. More...
 
void unregister_md_refresh_callback ()
 Unregisters the callback registered with register_md_refresh_callback(). More...
 
void register_query_quarantined_destinations (const QueryQuarantinedDestinationsCallback &clb)
 Registers a callback that could be used for checking if the provided destination candidate is currently quarantined. More...
 
void unregister_query_quarantined_destinations ()
 Unregisters the callback registered with register_query_quarantined_destinations(). More...
 
virtual bool is_dynamic ()
 Specifies if the destination addresses can be added/removed from the set. More...
 
virtual std::string get_dynamic_plugin_name ()
 

Protected Attributes

AllowedNodesChangeCallbacksList allowed_nodes_change_callbacks_
 
MetadataRefreshCallback md_refresh_callback_
 
RefreshSocketAcceptorStateCallback refresh_router_socket_acceptor_state_callback_
 
QueryQuarantinedDestinationsCallback query_quarantined_destinations_callback_
 
std::mutex allowed_nodes_change_callbacks_mtx_
 
std::mutex md_refresh_callback_mtx_
 
std::mutex socket_acceptor_handle_callbacks_mtx
 
std::mutex query_quarantined_destinations_callback_mtx_
 

Detailed Description

Allows the obervers to register for notifications on the change in the state of the destination nodes.

Constructor & Destructor Documentation

◆ ~DestinationNodesStateNotifier()

virtual DestinationNodesStateNotifier::~DestinationNodesStateNotifier ( )
virtualdefault

Member Function Documentation

◆ get_dynamic_plugin_name()

std::string DestinationNodesStateNotifier::get_dynamic_plugin_name ( )
virtual

Reimplemented in DestMetadataCacheManager.

◆ is_dynamic()

bool DestinationNodesStateNotifier::is_dynamic ( )
virtual

Specifies if the destination addresses can be added/removed from the set.

NOTE: the sequence of nodes may change.

Reimplemented in DestMetadataCacheManager.

◆ register_allowed_nodes_change_callback()

AllowedNodesChangeCallbacksListIterator DestinationNodesStateNotifier::register_allowed_nodes_change_callback ( const AllowedNodesChangedCallback &  clb)

Registers the callback for notification on the change in the state if the destination nodes.

Parameters
clbcallback that should be called
Returns
identifier of the inserted callback, can be used to unregister the callback

◆ register_md_refresh_callback()

void DestinationNodesStateNotifier::register_md_refresh_callback ( const MetadataRefreshCallback &  callback)

Registers a callback that is going to be used on metadata refresh.

Parameters
callbackCallback that will be called on each metadata refresh.

◆ register_query_quarantined_destinations()

void DestinationNodesStateNotifier::register_query_quarantined_destinations ( const QueryQuarantinedDestinationsCallback &  clb)

Registers a callback that could be used for checking if the provided destination candidate is currently quarantined.

Parameters
clbCallback to query unreachable destinations.

◆ register_refresh_router_socket_acceptor_state()

void DestinationNodesStateNotifier::register_refresh_router_socket_acceptor_state ( const RefreshSocketAcceptorStateCallback &  clb)

Registers the callback for notification that the routing socket acceptor state may need to be refreshed.

Parameters
clbcallback that should be called

◆ unregister_allowed_nodes_change_callback()

void DestinationNodesStateNotifier::unregister_allowed_nodes_change_callback ( const AllowedNodesChangeCallbacksListIterator &  it)

Unregisters the callback registered with register_allowed_nodes_change_callback().

Parameters
ititerator returned by the call to register_allowed_nodes_change_callback()

◆ unregister_md_refresh_callback()

void DestinationNodesStateNotifier::unregister_md_refresh_callback ( )

Unregisters the callback registered with register_md_refresh_callback().

◆ unregister_query_quarantined_destinations()

void DestinationNodesStateNotifier::unregister_query_quarantined_destinations ( )

Unregisters the callback registered with register_query_quarantined_destinations().

◆ unregister_refresh_router_socket_acceptor_state()

void DestinationNodesStateNotifier::unregister_refresh_router_socket_acceptor_state ( )

Unregisters the callback registered with register_refresh_router_socket_acceptor_state().

Member Data Documentation

◆ allowed_nodes_change_callbacks_

AllowedNodesChangeCallbacksList DestinationNodesStateNotifier::allowed_nodes_change_callbacks_
protected

◆ allowed_nodes_change_callbacks_mtx_

std::mutex DestinationNodesStateNotifier::allowed_nodes_change_callbacks_mtx_
mutableprotected

◆ md_refresh_callback_

MetadataRefreshCallback DestinationNodesStateNotifier::md_refresh_callback_
protected

◆ md_refresh_callback_mtx_

std::mutex DestinationNodesStateNotifier::md_refresh_callback_mtx_
mutableprotected

◆ query_quarantined_destinations_callback_

QueryQuarantinedDestinationsCallback DestinationNodesStateNotifier::query_quarantined_destinations_callback_
protected

◆ query_quarantined_destinations_callback_mtx_

std::mutex DestinationNodesStateNotifier::query_quarantined_destinations_callback_mtx_
mutableprotected

◆ refresh_router_socket_acceptor_state_callback_

RefreshSocketAcceptorStateCallback DestinationNodesStateNotifier::refresh_router_socket_acceptor_state_callback_
protected

◆ socket_acceptor_handle_callbacks_mtx

std::mutex DestinationNodesStateNotifier::socket_acceptor_handle_callbacks_mtx
mutableprotected

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