MySQL 9.3.0
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
s_mysql_mysql_option_tracker_usage_cache_callbacks Struct Reference

Option tracker usage cache updater callbacks registry. More...

#include <mysql_option_tracker.h>

Public Attributes

mysql_service_status_t(* add )(const char *option_name, mysql_option_tracker_usage_cache_update_callback callback)
 Call this when the component is initalized. More...
 
mysql_service_status_t(* remove )(const char *option_name, mysql_option_tracker_usage_cache_update_callback callback)
 Call this when the component is de-initalized and a callback has been added. More...
 

Detailed Description

Option tracker usage cache updater callbacks registry.

Handles the reset of the intial cached values when the persisted data changes.

The idea is that each component needs to register a callback to be called when there's update of the persited values coming via means different from the mysql_option_tracker_usage::set method. The callback is supposed to update the in-memory status variable cache for that option. Call add() after reading the status value. Call delete() when removing the component and the callback was added. Expect offline calls to the callback when data are updated via the GR signalling service.

Member Data Documentation

◆ add

mysql_service_status_t(* s_mysql_mysql_option_tracker_usage_cache_callbacks::add) (const char *option_name, mysql_option_tracker_usage_cache_update_callback callback)

Call this when the component is initalized.

Pass a callback pointer that will, when called, set the value of the cache to the value passed

Parameters
option_namethe name of the option to add callback to
callbacka function pointer to a function to be called to set the new value
Return values
falsesuccess
truefailure

◆ remove

mysql_service_status_t(* s_mysql_mysql_option_tracker_usage_cache_callbacks::remove) (const char *option_name, mysql_option_tracker_usage_cache_update_callback callback)

Call this when the component is de-initalized and a callback has been added.

Pass the same callback pointer as the one passed to add(). It will be checked.

Parameters
option_namethe name of the option to add callback to
callbackfor verification; the same callback function as is passed to add
Return values
falsesuccess
truefailure

The documentation for this struct was generated from the following file: