24#ifndef SQL_REFERENCE_CACHING_SETUP_H
25#define SQL_REFERENCE_CACHING_SETUP_H
28#include <unordered_map>
37using Event_map = std::unordered_map<std::string, size_t>;
47 bool map(
const std::string &
event, std::pair<size_t, size_t> &index);
48 bool map(
const std::string &
event,
size_t &index);
57 bool map(
const std::string &
event, std::pair<size_t, size_t> &index) {
61 bool map(
const std::string &
event,
size_t &index) {
Definition: reference_caching_setup.h:109
Event_reference_caching_cache()
Definition: reference_caching_setup.cc:214
Cache_vector local_cache_vector_
Definition: reference_caching_setup.h:121
bool get(Event_tracking_class event_tracking_class, const my_h_service **services)
Definition: reference_caching_setup.cc:234
const mysql_service_reference_caching_cache_t * reference_caching_cache_service_
Definition: reference_caching_setup.h:122
~Event_reference_caching_cache()
Definition: reference_caching_setup.cc:222
void deinit()
Definition: reference_caching_setup.cc:224
void refresh_all()
Definition: reference_caching_setup.cc:247
bool valid() const
Definition: reference_caching_setup.h:115
bool valid_
Definition: reference_caching_setup.h:120
Definition: reference_caching_setup.h:43
Event_mapping()
Definition: reference_caching_setup.cc:96
~Event_mapping()
Definition: reference_caching_setup.h:46
bool map(const std::string &event, std::pair< size_t, size_t > &index)
Definition: reference_caching_setup.cc:103
Event_map event_map_
Definition: reference_caching_setup.h:51
Definition: reference_caching_setup.h:41
const mysql_service_reference_caching_cache_t * get_reference_caching_cache_handle()
Definition: reference_caching_setup.h:67
bool map(const std::string &event, std::pair< size_t, size_t > &index)
Definition: reference_caching_setup.h:57
Event_mapping event_mapping_
Event map.
Definition: reference_caching_setup.h:99
bool init()
Definition: reference_caching_setup.cc:136
bool valid_
Validity.
Definition: reference_caching_setup.h:87
std::atomic_int service_counters_[static_cast< size_t >(Event_tracking_class::LAST)]
Service counters.
Definition: reference_caching_setup.h:104
bool service_exists(Event_tracking_class event_tracking_class)
Definition: reference_caching_setup.h:75
void deinit()
Definition: reference_caching_setup.cc:164
bool create_cache(Cache_vector &cache_vector)
Definition: reference_caching_setup.cc:179
bool map(const std::string &event, size_t &index)
Definition: reference_caching_setup.h:61
static Event_reference_caching_channels * create()
Definition: reference_caching_setup.cc:173
mysql_service_reference_caching_channel_ignore_list_t * reference_caching_channel_ignore_list_
Handle to.
Definition: reference_caching_setup.h:96
mysql_service_reference_caching_channel_t * reference_caching_channel_service_
Handle to.
Definition: reference_caching_setup.h:90
bool service_notification(const char *name, bool load)
Definition: reference_caching_setup.cc:194
mysql_service_reference_caching_cache_t * reference_caching_cache_service_
Handle to.
Definition: reference_caching_setup.h:93
Event_reference_caching_channels()=default
~Event_reference_caching_channels()
Definition: reference_caching_setup.cc:124
bool valid() const
Definition: reference_caching_setup.h:71
Channel_vector channels_
Reference caching channels.
Definition: reference_caching_setup.h:101
struct my_h_service_imp * my_h_service
A handle type for acquired Service.
Definition: registry.h:33
bool load(THD *, const dd::String_type &fname, dd::String_type *buf)
Read an sdi file from disk and store in a buffer.
Definition: sdi_file.cc:308
Definition: services.cc:40
struct reference_caching_cache_imp * reference_caching_cache
A handle of a "reference cache".
Definition: reference_caching.h:47
struct reference_caching_channel_imp * reference_caching_channel
Handle for "producer channels".
Definition: reference_caching.h:39
std::unordered_map< std::string, size_t > Event_map
Definition: reference_caching_setup.h:37
Event_reference_caching_channels * g_event_channels
All reference caching channels maintained by server to handle event tracking broadcasts.
Definition: reference_caching_setup.cc:33
std::vector< reference_caching_cache > Cache_vector
Definition: reference_caching_setup.h:39
std::vector< reference_caching_channel > Channel_vector
Definition: reference_caching_setup.h:38
required string event
Definition: replication_group_member_actions.proto:32
#define SERVICE_TYPE(name)
Generates the standard Service type name.
Definition: service.h:76
#define SERVICE_TYPE_NO_CONST(name)
Generates the standard Service type name.
Definition: service.h:71
Event_tracking_class
Event tracking classes If a new event tracking class is introduced, this class should be kept in sync...
Definition: sql_event_tracking_to_audit_event_mapping.h:41
case opt name
Definition: sslopt-case.h:29