Kea 2.5.8
isc::dhcp::PgSqlHostContext Class Reference

PostgreSQL Host Context. More...

Public Member Functions

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

Public Attributes

PgSqlConnection conn_
 PostgreSQL connection.
 
boost::shared_ptr< PgSqlHostIPv6Exchange > host_ipv46_exchange_
 Pointer to an object representing an exchange which can be used to retrieve hosts, DHCPv4 and DHCPv6 options, and IPv6 reservations using a single query.
 
boost::shared_ptr< PgSqlHostWithOptionsExchange > host_ipv4_exchange_
 The exchange objects are used for transfer of data to/from the database.
 
boost::shared_ptr< PgSqlHostIPv6Exchange > host_ipv6_exchange_
 Pointer to an object representing an exchange which can be used to retrieve hosts, DHCPv6 options and IPv6 reservations.
 
boost::shared_ptr< PgSqlIPv6ReservationExchange > host_ipv6_reservation_exchange_
 Pointer to an object representing an exchange which can be used to insert new IPv6 reservation.
 
boost::shared_ptr< PgSqlOptionExchange > host_option_exchange_
 Pointer to an object representing an exchange which can be used to insert DHCPv4 or DHCPv6 option into dhcp4_options or dhcp6_options table.
 
bool is_readonly_
 Indicates if the database is opened in read only mode.
 

Detailed Description

PostgreSQL Host 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 1325 of file pgsql_host_data_source.cc.

Constructor & Destructor Documentation

◆ PgSqlHostContext()

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

Constructor.

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

Definition at line 2223 of file pgsql_host_data_source.cc.

Member Data Documentation

◆ conn_

PgSqlConnection isc::dhcp::PgSqlHostContext::conn_

PostgreSQL connection.

Definition at line 1365 of file pgsql_host_data_source.cc.

◆ host_ipv46_exchange_

boost::shared_ptr<PgSqlHostIPv6Exchange> isc::dhcp::PgSqlHostContext::host_ipv46_exchange_

Pointer to an object representing an exchange which can be used to retrieve hosts, DHCPv4 and DHCPv6 options, and IPv6 reservations using a single query.

Definition at line 1353 of file pgsql_host_data_source.cc.

◆ host_ipv4_exchange_

boost::shared_ptr<PgSqlHostWithOptionsExchange> isc::dhcp::PgSqlHostContext::host_ipv4_exchange_

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".)

Pointer to the object representing an exchange which can be used to retrieve hosts and DHCPv4 options.

Definition at line 1344 of file pgsql_host_data_source.cc.

◆ host_ipv6_exchange_

boost::shared_ptr<PgSqlHostIPv6Exchange> isc::dhcp::PgSqlHostContext::host_ipv6_exchange_

Pointer to an object representing an exchange which can be used to retrieve hosts, DHCPv6 options and IPv6 reservations.

Definition at line 1348 of file pgsql_host_data_source.cc.

◆ host_ipv6_reservation_exchange_

boost::shared_ptr<PgSqlIPv6ReservationExchange> isc::dhcp::PgSqlHostContext::host_ipv6_reservation_exchange_

Pointer to an object representing an exchange which can be used to insert new IPv6 reservation.

Definition at line 1357 of file pgsql_host_data_source.cc.

◆ host_option_exchange_

boost::shared_ptr<PgSqlOptionExchange> isc::dhcp::PgSqlHostContext::host_option_exchange_

Pointer to an object representing an exchange which can be used to insert DHCPv4 or DHCPv6 option into dhcp4_options or dhcp6_options table.

Definition at line 1362 of file pgsql_host_data_source.cc.

◆ is_readonly_

bool isc::dhcp::PgSqlHostContext::is_readonly_

Indicates if the database is opened in read only mode.

Definition at line 1368 of file pgsql_host_data_source.cc.


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