![]() |
MySQL 9.3.0
Source Code Documentation
|
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... | |
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.
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
option_name | the name of the option to add callback to |
callback | a function pointer to a function to be called to set the new value |
false | success |
true | failure |
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.
option_name | the name of the option to add callback to |
callback | for verification; the same callback function as is passed to add |
false | success |
true | failure |