![]() |
MySQL 9.3.0
Source Code Documentation
|
Class to track the state and usage data of Replication features. More...
#include <rpl_opt_tracker.h>
Public Member Functions | |
Rpl_opt_tracker (mysql_service_registry_registration_t *srv_registry_registration, mysql_service_registry_registration_t *srv_registry_registration_no_lock) | |
virtual | ~Rpl_opt_tracker () |
Rpl_opt_tracker & | operator= (const Rpl_opt_tracker &info) |
Rpl_opt_tracker (const Rpl_opt_tracker &info) | |
void | worker () |
The thread worker that periodically tracks the replication features. More... | |
void | start_worker () |
Start the thread that periodically tracks the replication features. More... | |
void | stop_worker () |
Stop the thread that periodically tracks the replication features. More... | |
void | track_replication_replica (bool enabled) const |
Tracks the Replication Replica feature, including the usage data. More... | |
Static Public Attributes | |
static unsigned long long | m_opt_option_tracker_usage_binary_log = 0 |
static unsigned long long | m_opt_option_tracker_usage_replication_replica = 0 |
Static Protected Member Functions | |
static bool | cb_binlog (unsigned long long new_value) |
static bool | cb_replica (unsigned long long new_value) |
Static Protected Attributes | |
static bool | cb_binlog_define_failed = false |
static bool | cb_replica_define_failed = false |
Private Types | |
using | Service_type = const mysql_service_mysql_option_tracker_option_t |
using | Tracker_service_guard = my_service< Service_type > |
Private Member Functions | |
void | track_binary_log (const Tracker_service_guard &service_guard, bool enabled) const |
Tracks the Binary Log feature, including the usage data. More... | |
void | track_replication_replica (const Tracker_service_guard &service_guard, bool enabled) const |
Tracks the Replication Replica feature, including the usage data. More... | |
Static Private Member Functions | |
static bool | is_replication_replica_enabled () |
Helper method to get Replication Replica feature status. More... | |
static void | track (const Tracker_service_guard &service_guard, bool enabled, const std::string &fname, unsigned long long &usage_counter) |
Tracks a feature, including the usage data. More... | |
Private Attributes | |
mysql_service_registry_registration_t * | m_srv_registry_registration_no_lock {nullptr} |
my_thread_handle | m_thread_id |
bool | m_stop_worker {false} |
Static Private Attributes | |
static constexpr auto | m_service_name = "mysql_option_tracker_option" |
static constexpr const Timeout_type | s_tracking_period {600} |
static const std::string | s_c_name_mysql_server {"mysql_server"} |
static const std::string | s_f_name_binary_log {"Binary Log"} |
static const std::string | s_f_name_replication_replica |
Class to track the state and usage data of Replication features.
|
private |
|
private |
Rpl_opt_tracker::Rpl_opt_tracker | ( | mysql_service_registry_registration_t * | srv_registry_registration, |
mysql_service_registry_registration_t * | srv_registry_registration_no_lock | ||
) |
|
virtual |
Rpl_opt_tracker::Rpl_opt_tracker | ( | const Rpl_opt_tracker & | info | ) |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
staticprivate |
Helper method to get Replication Replica feature status.
true | enabled |
false | disabled |
Rpl_opt_tracker & Rpl_opt_tracker::operator= | ( | const Rpl_opt_tracker & | info | ) |
void Rpl_opt_tracker::start_worker | ( | ) |
Start the thread that periodically tracks the replication features.
void Rpl_opt_tracker::stop_worker | ( | ) |
Stop the thread that periodically tracks the replication features.
|
staticprivate |
Tracks a feature, including the usage data.
It only updates usage data if the feature is enabled. Internal method to be used after the mysql_option_tracker_option service is acquired.
service_guard | acquired service guard |
enabled | true: tracks as enabled false: tracks as disabled |
fname | feature name |
usage_counter | feature usage counter |
|
private |
Tracks the Binary Log feature, including the usage data.
It only updates usage data if the feature is enabled. Internal method to be used after the mysql_option_tracker_option service is acquired.
service_guard | acquired service guard |
enabled | true: tracks as enabled false: tracks as disabled |
void Rpl_opt_tracker::track_replication_replica | ( | bool | enabled | ) | const |
Tracks the Replication Replica feature, including the usage data.
It only updates usage data if the feature is enabled.
enabled | true: tracks as enabled false: tracks as disabled |
|
private |
Tracks the Replication Replica feature, including the usage data.
It only updates usage data if the feature is enabled.
service_guard | acquired service guard |
enabled | true: tracks as enabled false: tracks as disabled |
void Rpl_opt_tracker::worker | ( | ) |
The thread worker that periodically tracks the replication features.
|
staticprotected |
|
staticprotected |
|
static |
|
static |
|
staticconstexprprivate |
|
private |
|
private |
|
private |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticconstexprprivate |