![]() |
Kea
1.5.0
|
Holds access parameters and the configuration of the lease and hosts database connection. More...
#include <cfg_db_access.h>
Inheritance diagram for isc::dhcp::CfgDbAccess:Public Member Functions | |
| CfgDbAccess () | |
| Constructor. More... | |
| void | createManagers () const |
| Creates instance of lease manager and host data sources according to the configuration specified. More... | |
| std::string | getHostDbAccessString () const |
| Retrieves host database access string. More... | |
| std::list< std::string > | getHostDbAccessStringList () const |
| Retrieves host database access string. More... | |
| std::string | getLeaseDbAccessString () const |
| Retrieves lease database access string. More... | |
| void | setAppendedParameters (const std::string &appended_parameters) |
| Sets parameters which will be appended to the database access strings. More... | |
| void | setHostDbAccessString (const std::string &host_db_access, bool front=false) |
| Sets host database access string. More... | |
| void | setLeaseDbAccessString (const std::string &lease_db_access) |
| Sets lease database access string. More... | |
Protected Member Functions | |
| std::string | getAccessString (const std::string &access_string) const |
| Returns lease or host database access string. More... | |
Protected Attributes | |
| std::string | appended_parameters_ |
| Parameters to be appended to the database access strings. More... | |
| std::list< std::string > | host_db_access_ |
| Holds host database access strings. More... | |
| std::string | lease_db_access_ |
| Holds lease database access string. More... | |
Holds access parameters and the configuration of the lease and hosts database connection.
The database access strings use the same format as the strings passed to the isc::dhcp::LeaseMgrFactory::create function.
Definition at line 25 of file cfg_db_access.h.
| isc::dhcp::CfgDbAccess::CfgDbAccess | ( | ) |
Constructor.
Definition at line 24 of file cfg_db_access.cc.
| void isc::dhcp::CfgDbAccess::createManagers | ( | ) | const |
Creates instance of lease manager and host data sources according to the configuration specified.
Definition at line 56 of file cfg_db_access.cc.
References isc::dhcp::HostMgr::addBackend(), isc::dhcp::HostMgr::checkCacheBackend(), isc::dhcp::HostMgr::create(), isc::dhcp::LeaseMgrFactory::create(), isc::dhcp::LeaseMgrFactory::destroy(), getHostDbAccessStringList(), and getLeaseDbAccessString().
Here is the call graph for this function:
|
protected |
Returns lease or host database access string.
| access_string | without additional (appended) parameters. |
Definition at line 73 of file cfg_db_access.cc.
References appended_parameters_.
Referenced by getHostDbAccessString(), getHostDbAccessStringList(), and getLeaseDbAccessString().
| std::string isc::dhcp::CfgDbAccess::getHostDbAccessString | ( | ) | const |
Retrieves host database access string.
Definition at line 36 of file cfg_db_access.cc.
References getAccessString(), and host_db_access_.
Here is the call graph for this function:| std::list< std::string > isc::dhcp::CfgDbAccess::getHostDbAccessStringList | ( | ) | const |
Retrieves host database access string.
Definition at line 45 of file cfg_db_access.cc.
References getAccessString(), and host_db_access_.
Referenced by createManagers().
Here is the call graph for this function:| std::string isc::dhcp::CfgDbAccess::getLeaseDbAccessString | ( | ) | const |
Retrieves lease database access string.
Definition at line 30 of file cfg_db_access.cc.
References getAccessString(), and lease_db_access_.
Referenced by createManagers().
Here is the call graph for this function:
|
inline |
Sets parameters which will be appended to the database access strings.
| appended_parameters | String holding collection of parameters in the following format: "parameter0=value0 parameter1=value1 ...". |
Definition at line 35 of file cfg_db_access.h.
References appended_parameters_.
|
inline |
Sets host database access string.
| host_db_access | New host database access string. |
| front | Add at front if true, at back if false (default). |
Definition at line 62 of file cfg_db_access.h.
References host_db_access_.
|
inline |
Sets lease database access string.
| lease_db_access | New lease database access string. |
Definition at line 48 of file cfg_db_access.h.
References lease_db_access_.
|
protected |
Parameters to be appended to the database access strings.
Definition at line 90 of file cfg_db_access.h.
Referenced by getAccessString(), and setAppendedParameters().
|
protected |
Holds host database access strings.
Definition at line 96 of file cfg_db_access.h.
Referenced by getHostDbAccessString(), getHostDbAccessStringList(), setHostDbAccessString(), and isc::dhcp::CfgHostDbAccess::toElement().
|
protected |
Holds lease database access string.
Definition at line 93 of file cfg_db_access.h.
Referenced by getLeaseDbAccessString(), setLeaseDbAccessString(), and isc::dhcp::CfgLeaseDbAccess::toElement().