MySQL 9.1.0
Source Code Documentation
sp_cache Class Reference

Classes

struct  sp_head_deleter
 

Public Member Functions

 sp_cache ()
 
 ~sp_cache ()=default
 
bool insert (sp_head *sp)
 Inserts a sp_head object into a hash table. More...
 
sp_headlookup (char *name, size_t namelen)
 
void remove (sp_head *sp)
 
void enforce_limit (ulong upper_limit_for_elements)
 Remove all elements from a stored routine cache if the current number of elements exceeds the argument value. More...
 
bool has (sp_head *sp)
 Check if the sp_cache contains the specified element. More...
 

Private Attributes

collation_unordered_map< std::string, std::unique_ptr< sp_head, sp_head_deleter > > m_hashtable
 

Constructor & Destructor Documentation

◆ sp_cache()

sp_cache::sp_cache ( )
inline

◆ ~sp_cache()

sp_cache::~sp_cache ( )
default

Member Function Documentation

◆ enforce_limit()

void sp_cache::enforce_limit ( ulong  upper_limit_for_elements)
inline

Remove all elements from a stored routine cache if the current number of elements exceeds the argument value.

Parameters
[in]upper_limit_for_elementsSoft upper limit of elements that can be stored in the cache.

◆ has()

bool sp_cache::has ( sp_head sp)
inline

Check if the sp_cache contains the specified element.

Parameters
spsp_head
Returns
true if the element is in the cache.
false if not.

◆ insert()

bool sp_cache::insert ( sp_head sp)
inline

Inserts a sp_head object into a hash table.

Returns
Success status
true Failure
false Success

◆ lookup()

sp_head * sp_cache::lookup ( char *  name,
size_t  namelen 
)
inline

◆ remove()

void sp_cache::remove ( sp_head sp)
inline

Member Data Documentation

◆ m_hashtable

collation_unordered_map<std::string, std::unique_ptr<sp_head, sp_head_deleter> > sp_cache::m_hashtable
private

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