MySQL  8.0.19
Source Code Documentation
Plugin_stage_monitor_handler Class Reference

#include <stage_monitor_handler.h>

Public Member Functions

 Plugin_stage_monitor_handler ()
 
virtual ~Plugin_stage_monitor_handler ()
 
int initialize_stage_monitor ()
 Fetch the registry and the service for this class. More...
 
int terminate_stage_monitor ()
 Terminate the stage monitor. More...
 
int set_stage (PSI_stage_key key, const char *file, int line, ulonglong estimated_work, ulonglong work_completed)
 Set that a new stage is now in progress. More...
 
void set_estimated_work (ulonglong estimated_work)
 Set the currently estimated work for this stage. More...
 
void set_completed_work (ulonglong completed_work)
 Set the currently completed work for this stage. More...
 
void end_stage ()
 End the current stage. More...
 

Private Attributes

my_h_service generic_service
 The generic service handle for the PSI stage service. More...
 
PSI_stage_progressstage_progress_handler
 The progress handler when a stage is running. More...
 
bool service_running
 Is the reference to the PSI stage service still valid. More...
 
mysql_mutex_t stage_monitor_lock
 Lock for use vs termination scenarios. More...
 

Constructor & Destructor Documentation

◆ Plugin_stage_monitor_handler()

Plugin_stage_monitor_handler::Plugin_stage_monitor_handler ( )

◆ ~Plugin_stage_monitor_handler()

Plugin_stage_monitor_handler::~Plugin_stage_monitor_handler ( )
virtual

Member Function Documentation

◆ end_stage()

void Plugin_stage_monitor_handler::end_stage ( )

End the current stage.

◆ initialize_stage_monitor()

int Plugin_stage_monitor_handler::initialize_stage_monitor ( )

Fetch the registry and the service for this class.

Returns
0 in case of success, or 1 otherwise

◆ set_completed_work()

void Plugin_stage_monitor_handler::set_completed_work ( ulonglong  completed_work)

Set the currently completed work for this stage.

◆ set_estimated_work()

void Plugin_stage_monitor_handler::set_estimated_work ( ulonglong  estimated_work)

Set the currently estimated work for this stage.

◆ set_stage()

int Plugin_stage_monitor_handler::set_stage ( PSI_stage_key  key,
const char *  file,
int  line,
ulonglong  estimated_work,
ulonglong  work_completed 
)

Set that a new stage is now in progress.

Parameters
keyThe PSI key for the stage
filethe file for this stage
linethe line of the file for this stage
estimated_workwhat work is estimated for this stage
work_completedwhat work already completed for this stage
Returns
0 in case of success, or 1 otherwise

◆ terminate_stage_monitor()

int Plugin_stage_monitor_handler::terminate_stage_monitor ( )

Terminate the stage monitor.

It means the stage monitor is declared as not running and the service is released.

Returns
0 in case of success, or 1 otherwise

Member Data Documentation

◆ generic_service

my_h_service Plugin_stage_monitor_handler::generic_service
private

The generic service handle for the PSI stage service.

◆ service_running

bool Plugin_stage_monitor_handler::service_running
private

Is the reference to the PSI stage service still valid.

◆ stage_monitor_lock

mysql_mutex_t Plugin_stage_monitor_handler::stage_monitor_lock
private

Lock for use vs termination scenarios.

◆ stage_progress_handler

PSI_stage_progress* Plugin_stage_monitor_handler::stage_progress_handler
private

The progress handler when a stage is running.


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