Kea  2.1.7-git
isc::dhcp::PgSqlLeaseContext Class Reference

PostgreSQL Lease Context. More...

#include <pgsql_lease_mgr.h>

Public Member Functions

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

Public Attributes

db::PgSqlConnection conn_
 PostgreSQL connection. More...
boost::scoped_ptr< PgSqlLease4Exchangeexchange4_
 The exchange objects are used for transfer of data to/from the database. More...
boost::scoped_ptr< PgSqlLease6Exchangeexchange6_
 Exchange object. More...

Detailed Description

PostgreSQL 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 40 of file pgsql_lease_mgr.h.

Constructor & Destructor Documentation

◆ PgSqlLeaseContext()

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


parametersSee PgSqlLeaseMgr constructor.
io_service_accessorThe IOService accessor function.
db_reconnect_callbackThe connection recovery callback.

Definition at line 1194 of file

References isc_throw.

Member Data Documentation

◆ conn_

db::PgSqlConnection isc::dhcp::PgSqlLeaseContext::conn_

PostgreSQL connection.

Definition at line 60 of file pgsql_lease_mgr.h.

◆ exchange4_

boost::scoped_ptr<PgSqlLease4Exchange> isc::dhcp::PgSqlLeaseContext::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 56 of file pgsql_lease_mgr.h.

◆ exchange6_

boost::scoped_ptr<PgSqlLease6Exchange> isc::dhcp::PgSqlLeaseContext::exchange6_

Exchange object.

Definition at line 57 of file pgsql_lease_mgr.h.

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