Kea 2.5.8
isc::dhcp::MySqlHostContext Class Reference

MySQL Host Context. More...

Public Member Functions

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

Public Attributes

MySqlConnection conn_
 MySQL connection.
 
boost::shared_ptr< MySqlHostIPv6Exchange > 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< MySqlHostWithOptionsExchange > host_ipv4_exchange_
 The exchange objects are used for transfer of data to/from the database.
 
boost::shared_ptr< MySqlHostIPv6Exchange > 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< MySqlIPv6ReservationExchange > host_ipv6_reservation_exchange_
 Pointer to an object representing an exchange which can be used to insert new IPv6 reservation.
 
boost::shared_ptr< MySqlOptionExchange > 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

MySQL 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 2011 of file mysql_host_data_source.cc.

Constructor & Destructor Documentation

◆ MySqlHostContext()

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

Constructor.

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

Definition at line 2828 of file mysql_host_data_source.cc.

Member Data Documentation

◆ conn_

MySqlConnection isc::dhcp::MySqlHostContext::conn_

MySQL connection.

Definition at line 2051 of file mysql_host_data_source.cc.

◆ host_ipv46_exchange_

boost::shared_ptr<MySqlHostIPv6Exchange> isc::dhcp::MySqlHostContext::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 2039 of file mysql_host_data_source.cc.

◆ host_ipv4_exchange_

boost::shared_ptr<MySqlHostWithOptionsExchange> isc::dhcp::MySqlHostContext::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 an object representing an exchange which can be used to retrieve hosts and DHCPv4 options.

Definition at line 2030 of file mysql_host_data_source.cc.

◆ host_ipv6_exchange_

boost::shared_ptr<MySqlHostIPv6Exchange> isc::dhcp::MySqlHostContext::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 2034 of file mysql_host_data_source.cc.

◆ host_ipv6_reservation_exchange_

boost::shared_ptr<MySqlIPv6ReservationExchange> isc::dhcp::MySqlHostContext::host_ipv6_reservation_exchange_

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

Definition at line 2043 of file mysql_host_data_source.cc.

◆ host_option_exchange_

boost::shared_ptr<MySqlOptionExchange> isc::dhcp::MySqlHostContext::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 2048 of file mysql_host_data_source.cc.

◆ is_readonly_

bool isc::dhcp::MySqlHostContext::is_readonly_

Indicates if the database is opened in read only mode.

Definition at line 2054 of file mysql_host_data_source.cc.


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