MySQL 8.3.0
Source Code Documentation
event_tracking_lifecycle_consumer_helper.h File Reference

Helper file to create lifecycle event consumer. More...

Go to the source code of this file.

Classes

class  Event_tracking_implementation::Event_tracking_lifecycle_implementation
 Implementation helper class for lifecycle events. More...
 

Namespaces

namespace  Event_tracking_implementation
 

Macros

#define PROVIDES_SERVICE_EVENT_TRACKING_LIFECYCLE(component)    PROVIDES_SERVICE(component, event_tracking_lifecycle)
  More...
 
#define IMPLEMENTS_SERVICE_EVENT_TRACKING_LIFECYCLE(component)
 

Detailed Description

Helper file to create lifecycle event consumer.

Macro Definition Documentation

◆ IMPLEMENTS_SERVICE_EVENT_TRACKING_LIFECYCLE

#define IMPLEMENTS_SERVICE_EVENT_TRACKING_LIFECYCLE (   component)
Value:
BEGIN_SERVICE_IMPLEMENTATION(component, event_tracking_lifecycle) \
Event_tracking_implementation::Event_tracking_lifecycle_implementation:: \
notify_startup, \
Event_tracking_implementation::Event_tracking_lifecycle_implementation:: \
notify_shutdown \
END_SERVICE_IMPLEMENTATION()
#define BEGIN_SERVICE_IMPLEMENTATION(component, service)
Declares a Service Implementation.
Definition: service_implementation.h:61

◆ PROVIDES_SERVICE_EVENT_TRACKING_LIFECYCLE

#define PROVIDES_SERVICE_EVENT_TRACKING_LIFECYCLE (   component)     PROVIDES_SERVICE(component, event_tracking_lifecycle)

#include "mysql/components/util/event_tracking_lifecycle_consumer_helper.h"
// Replace following with union of startup subevents to be filtered
Event_tracking_lifecycle_subclass_t
// Replace following with union of shutdown subevents to be filtered
Event_tracking_lifecycle_subclass_t
const mysql_event_tracking_startup_data *data [[maybe_unused]]) {
// Your code goes here
}
const mysql_event_tracking_shutdown_data *data [[maybe_unused]]) {
// Your code goes here
}
} // namespace Event_tracking_implementation
// Define init/deinit methods for component
// Component declaration related stuff
BEGIN_COMPONENT_PROVIDES(<component_name>)
// Rest of the component declaration code
static bool callback(const mysql_event_tracking_startup_data *data)
Callback function - To be implemented by component to handle an event.
static mysql_event_tracking_shutdown_subclass_t shutdown_filtered_sub_events
Sub-events to be filtered/ignored - To be defined by the component.
Definition: event_tracking_lifecycle_consumer_helper.h:99
static mysql_event_tracking_startup_subclass_t startup_filtered_sub_events
Sub-events to be filtered/ignored - To be defined by the component.
Definition: event_tracking_lifecycle_consumer_helper.h:96
#define END_COMPONENT_PROVIDES()
A macro to end the last declaration started with the BEGIN_COMPONENT_PROVIDES.
Definition: component_implementation.h:203
#define BEGIN_COMPONENT_PROVIDES(name)
Creates a service implementation list that are provided by specified component.
Definition: component_implementation.h:182
#define IMPLEMENTS_SERVICE_EVENT_TRACKING_LIFECYCLE(component)
Definition: event_tracking_lifecycle_consumer_helper.h:83
#define PROVIDES_SERVICE_EVENT_TRACKING_LIFECYCLE(component)
Definition: event_tracking_lifecycle_consumer_helper.h:80
Definition: event_tracking_authentication_consumer_helper.h:80
Structure for Shutdown event tracking.
Definition: event_tracking_lifecycle_defs.h:86
Structure for Startup event tracking.
Definition: event_tracking_lifecycle_defs.h:48