MySQL  8.0.17
Source Code Documentation
Log_resource Class Referenceabstract

This is the base class that the logic of collecting a MySQL server instance resources log will call. More...

#include <log_resource.h>

Inheritance diagram for Log_resource:
Log_resource_binlog_wrapper Log_resource_gtid_state_wrapper Log_resource_hton_wrapper Log_resource_mi_wrapper

Public Member Functions

 Log_resource (Json_dom *json_arg)
 Log_resource constructor. More...
 
virtual ~Log_resource ()
 Destructor. More...
 
Json_domget_json ()
 Return the pointer to the JSON object that should be used to fill the resource log information. More...
 
virtual void lock ()=0
 Lock the resource avoiding updates. More...
 
virtual void unlock ()=0
 Unlock the resource allowing updates. More...
 
virtual bool collect_info ()=0
 Collect resource log information. More...
 

Static Public Member Functions

static int dummy_function_to_ensure_we_are_linked_into_the_server ()
 There must be one function of this kind in order for the symbols in the server's dynamic library to be visible to plugins. More...
 

Private Attributes

Json_domjson = nullptr
 

Detailed Description

This is the base class that the logic of collecting a MySQL server instance resources log will call.

It basically contains lock, unlock and collect functions that shall be overridden by more specialized classes to handle the specific cases of resources participating in the process.

Constructor & Destructor Documentation

◆ Log_resource()

Log_resource::Log_resource ( Json_dom json_arg)
inline

Log_resource constructor.

Parameters
[in]json_argthe pointer to the JSON object to be populated with the resource log information.

◆ ~Log_resource()

virtual Log_resource::~Log_resource ( )
inlinevirtual

Destructor.

This function will point the JSON object to nullptr.

Member Function Documentation

◆ collect_info()

virtual bool Log_resource::collect_info ( )
pure virtual

Collect resource log information.

Returns
false on success. true if there was an error collecting the information.

Implemented in Log_resource_hton_wrapper, Log_resource_gtid_state_wrapper, Log_resource_binlog_wrapper, and Log_resource_mi_wrapper.

◆ dummy_function_to_ensure_we_are_linked_into_the_server()

int Log_resource::dummy_function_to_ensure_we_are_linked_into_the_server ( )
static

There must be one function of this kind in order for the symbols in the server's dynamic library to be visible to plugins.

◆ get_json()

Json_dom* Log_resource::get_json ( )
inline

Return the pointer to the JSON object that should be used to fill the resource log information.

Returns
the Json_object pointer to be filled with the log information.

◆ lock()

virtual void Log_resource::lock ( )
pure virtual

◆ unlock()

virtual void Log_resource::unlock ( )
pure virtual

Member Data Documentation

◆ json

Json_dom* Log_resource::json = nullptr
private

The documentation for this class was generated from the following files: