MySQL 8.0.39
Source Code Documentation
mysql_dynamic_loader_scheme_file_imp Class Reference

#include <dynamic_loader_scheme_file_imp.h>

Static Public Member Functions

static void init ()
 Initializes file:// scheme for dynamic loader for usage. More...
 
static void deinit ()
 De-initializes RW lock, all other structures doesn't require any action. More...
 
static mysql_service_status_t load (const char *urn, mysql_component_t **out_data) noexcept
 Loads components that are located in executable file specified by URN. More...
 
static mysql_service_status_t unload (const char *urn) noexcept
 Unloads file that was previously loaded. More...
 

Private Types

typedef std::map< std::string, void * > my_registry
 
typedef mysql_component_t *(* list_components_func) ()
 

Static Private Attributes

static my_registry object_files_list
 
static std::unordered_set< list_components_funclibrary_entry_set
 
static mysql_rwlock_t LOCK_dynamic_loader_scheme_file
 

Member Typedef Documentation

◆ list_components_func

typedef mysql_component_t *(* mysql_dynamic_loader_scheme_file_imp::list_components_func) ()
private

◆ my_registry

typedef std::map<std::string, void *> mysql_dynamic_loader_scheme_file_imp::my_registry
private

Member Function Documentation

◆ deinit()

void mysql_dynamic_loader_scheme_file_imp::deinit ( )
static

De-initializes RW lock, all other structures doesn't require any action.

◆ init()

void mysql_dynamic_loader_scheme_file_imp::init ( )
static

Initializes file:// scheme for dynamic loader for usage.

Initializes RW lock, all other structures should be empty. Shouldn't be called multiple times.

◆ load()

mysql_service_status_t mysql_dynamic_loader_scheme_file_imp::load ( const char *  urn,
mysql_component_t **  out_data 
)
staticnoexcept

Loads components that are located in executable file specified by URN.

We assume that URN starts with file://, but accept any. Will not success when called multiple times on the same file.

Parameters
urnURN to file to load components from.
[out]out_dataPointer to pointer to MySQL component data structures to set result components data retrieved from specified file.
Returns
Status of performed operation
Return values
falsesuccess
trueFailure, may be caused when name does not contain ://, cannot be located, is not proper executable file or does not contain proper initialization function.

◆ unload()

mysql_service_status_t mysql_dynamic_loader_scheme_file_imp::unload ( const char *  urn)
staticnoexcept

Unloads file that was previously loaded.

The URN string must be exactly the same as one used during call to load. Although you can call load() on specified URN multiple times, subsequent calls unload() will always fail, and all components from specified file will be invalid after first call to unload().

Parameters
urnURN to file to unload all components from.
Returns
Status of performed operation
Return values
falsesuccess
truefailure

Member Data Documentation

◆ library_entry_set

std::unordered_set< mysql_dynamic_loader_scheme_file_imp::list_components_func > mysql_dynamic_loader_scheme_file_imp::library_entry_set
staticprivate

◆ LOCK_dynamic_loader_scheme_file

mysql_rwlock_t mysql_dynamic_loader_scheme_file_imp::LOCK_dynamic_loader_scheme_file
staticprivate

◆ object_files_list

mysql_dynamic_loader_scheme_file_imp::my_registry mysql_dynamic_loader_scheme_file_imp::object_files_list
staticprivate

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