MySQL 8.0.40
Source Code Documentation
PoolManager< Pool, LockStrategy > Struct Template Reference

#include <ut0pool.h>

Public Types

typedef Pool PoolType
 
typedef PoolType::value_type value_type
 

Public Member Functions

 PoolManager (size_t size)
 
 ~PoolManager ()
 
value_typeget ()
 Get an element from one of the pools. More...
 

Static Public Member Functions

static void mem_free (value_type *ptr)
 

Private Types

typedef std::vector< PoolType *, ut::allocator< PoolType * > > Pools
 

Private Member Functions

bool add_pool (size_t n_pools)
 Add a new pool. More...
 
void create ()
 Create the pool manager. More...
 
void destroy ()
 Release the resources. More...
 
 PoolManager (const PoolManager &)
 
PoolManageroperator= (const PoolManager &)
 

Private Attributes

size_t m_size
 Size of each block. More...
 
Pools m_pools
 Pools managed this manager. More...
 
LockStrategy m_lock_strategy
 Lock strategy to use. More...
 

Member Typedef Documentation

◆ Pools

template<typename Pool , typename LockStrategy >
typedef std::vector<PoolType *, ut::allocator<PoolType *> > PoolManager< Pool, LockStrategy >::Pools
private

◆ PoolType

template<typename Pool , typename LockStrategy >
typedef Pool PoolManager< Pool, LockStrategy >::PoolType

◆ value_type

template<typename Pool , typename LockStrategy >
typedef PoolType::value_type PoolManager< Pool, LockStrategy >::value_type

Constructor & Destructor Documentation

◆ PoolManager() [1/2]

template<typename Pool , typename LockStrategy >
PoolManager< Pool, LockStrategy >::PoolManager ( size_t  size)
inline

◆ ~PoolManager()

template<typename Pool , typename LockStrategy >
PoolManager< Pool, LockStrategy >::~PoolManager ( )
inline

◆ PoolManager() [2/2]

template<typename Pool , typename LockStrategy >
PoolManager< Pool, LockStrategy >::PoolManager ( const PoolManager< Pool, LockStrategy > &  )
private

Member Function Documentation

◆ add_pool()

template<typename Pool , typename LockStrategy >
bool PoolManager< Pool, LockStrategy >::add_pool ( size_t  n_pools)
inlineprivate

Add a new pool.

Parameters
n_poolsNumber of pools that existed when the add pool was called.
Returns
true on success

◆ create()

template<typename Pool , typename LockStrategy >
void PoolManager< Pool, LockStrategy >::create ( )
inlineprivate

Create the pool manager.

◆ destroy()

template<typename Pool , typename LockStrategy >
void PoolManager< Pool, LockStrategy >::destroy ( )
inlineprivate

Release the resources.

◆ get()

template<typename Pool , typename LockStrategy >
value_type * PoolManager< Pool, LockStrategy >::get ( )
inline

Get an element from one of the pools.

Returns
instance or NULL if pool is empty.

◆ mem_free()

template<typename Pool , typename LockStrategy >
static void PoolManager< Pool, LockStrategy >::mem_free ( value_type ptr)
inlinestatic

◆ operator=()

template<typename Pool , typename LockStrategy >
PoolManager & PoolManager< Pool, LockStrategy >::operator= ( const PoolManager< Pool, LockStrategy > &  )
private

Member Data Documentation

◆ m_lock_strategy

template<typename Pool , typename LockStrategy >
LockStrategy PoolManager< Pool, LockStrategy >::m_lock_strategy
private

Lock strategy to use.

◆ m_pools

template<typename Pool , typename LockStrategy >
Pools PoolManager< Pool, LockStrategy >::m_pools
private

Pools managed this manager.

◆ m_size

template<typename Pool , typename LockStrategy >
size_t PoolManager< Pool, LockStrategy >::m_size
private

Size of each block.


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