Kea 2.5.8
isc::dhcp::MySqlLeaseContext Class Reference

MySQL Lease Context. More...

#include <mysql_lease_mgr.h>

Public Member Functions

 MySqlLeaseContext (const db::DatabaseConnection::ParameterMap &parameters, db::IOServiceAccessorPtr io_service_accessor, db::DbCallback db_reconnect_callback)
 Constructor.
 

Public Attributes

db::MySqlConnection conn_
 MySQL connection.
 
boost::scoped_ptr< MySqlLease4Exchangeexchange4_
 The exchange objects are used for transfer of data to/from the database.
 
boost::scoped_ptr< MySqlLease6Exchangeexchange6_
 Exchange object.
 

Detailed Description

MySQL Lease Context.

This class stores the thread context for the manager pool. The class is needed by all get/update/delete functions which must use one or more exchanges to perform database operations. Each context provides a set of such exchanges for each thread. The context instances are lazy initialized by the requesting thread by using the manager's createContext function and are destroyed when the manager's pool instance is destroyed.

Definition at line 41 of file mysql_lease_mgr.h.

Constructor & Destructor Documentation

◆ MySqlLeaseContext()

isc::dhcp::MySqlLeaseContext::MySqlLeaseContext ( const db::DatabaseConnection::ParameterMap parameters,
db::IOServiceAccessorPtr  io_service_accessor,
db::DbCallback  db_reconnect_callback 
)

Constructor.

Parameters
parametersSee MySqlLeaseMgr constructor.
io_service_accessorThe IOService accessor function.
db_reconnect_callbackThe connection recovery callback.

Definition at line 2101 of file mysql_lease_mgr.cc.

Member Data Documentation

◆ conn_

db::MySqlConnection isc::dhcp::MySqlLeaseContext::conn_

MySQL connection.

Definition at line 61 of file mysql_lease_mgr.h.

◆ exchange4_

boost::scoped_ptr<MySqlLease4Exchange> isc::dhcp::MySqlLeaseContext::exchange4_

The exchange objects are used for transfer of data to/from the database.

They are pointed-to objects as the contents may change in "const" calls, while the rest of this object does not. (At alternative would be to declare them as "mutable".) Exchange object

Definition at line 57 of file mysql_lease_mgr.h.

◆ exchange6_

boost::scoped_ptr<MySqlLease6Exchange> isc::dhcp::MySqlLeaseContext::exchange6_

Exchange object.

Definition at line 58 of file mysql_lease_mgr.h.


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