MySQL 9.1.0
Source Code Documentation
PooledConnection< T > Class Template Reference

pooled connection. More...

#include <connection_pool.h>

Inheritance diagram for PooledConnection< T >:
[legend]

Public Types

using Ssl = mysql_harness::Ssl
 
using connection_type = T
 

Public Member Functions

 PooledConnection (connection_type conn)
 
connection_typeconnection ()
 access to conn_. More...
 
const connection_typeconnection () const
 
void reset ()
 prepares for reusing the connection. More...
 
- Public Member Functions inherited from PooledConnectionBase
void remover (std::function< void()> remover)
 set a remove-callback. More...
 
void remove_me ()
 calls remove-callback. More...
 
void reset ()
 

Private Member Functions

void async_idle (std::chrono::milliseconds idle_timeout)
 wait for idle timeout. More...
 
void async_recv_message ()
 wait for server message and shutdown. More...
 

Private Attributes

connection_type conn_
 
net::steady_timer idle_timer_
 

Friends

class ConnectionPool
 

Detailed Description

template<class T>
class PooledConnection< T >

pooled connection.

Member Typedef Documentation

◆ connection_type

template<class T >
using PooledConnection< T >::connection_type = T

◆ Ssl

template<class T >
using PooledConnection< T >::Ssl = mysql_harness::Ssl

Constructor & Destructor Documentation

◆ PooledConnection()

template<class T >
PooledConnection< T >::PooledConnection ( connection_type  conn)
inline

Member Function Documentation

◆ async_idle()

template<class T >
void PooledConnection< T >::async_idle ( std::chrono::milliseconds  idle_timeout)
inlineprivate

wait for idle timeout.

◆ async_recv_message()

template<class T >
void PooledConnection< T >::async_recv_message ( )
inlineprivate

wait for server message and shutdown.

◆ connection() [1/2]

template<class T >
connection_type & PooledConnection< T >::connection ( )
inline

access to conn_.

allows others to move the connection structs out.

◆ connection() [2/2]

template<class T >
const connection_type & PooledConnection< T >::connection ( ) const
inline

◆ reset()

template<class T >
void PooledConnection< T >::reset ( )
inline

prepares for reusing the connection.

Friends And Related Function Documentation

◆ ConnectionPool

template<class T >
friend class ConnectionPool
friend

Member Data Documentation

◆ conn_

template<class T >
connection_type PooledConnection< T >::conn_
private

◆ idle_timer_

template<class T >
net::steady_timer PooledConnection< T >::idle_timer_
private

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