Kea 2.7.6
|
Embodies configuration information used during a server's configuration process. More...
#include <config_ctl_info.h>
Public Member Functions | |
ConfigControlInfo () | |
Constructor. | |
ConfigControlInfo (const ConfigControlInfo &other) | |
Copy Constructor. | |
void | addConfigDatabase (const std::string &access_str) |
Sets configuration database access string. | |
void | clear () |
Empties the contents of the class, including the database list. | |
bool | equals (const ConfigControlInfo &other) const |
Compares two objects for equality. | |
const ConfigDbInfo & | findConfigDb (const std::string ¶m_name, const std::string ¶m_value) |
Retrieves the database with the given access parameter value. | |
const ConfigDbInfoList & | getConfigDatabases () const |
Retrieves the list of databases. | |
const util::Optional< uint16_t > & | getConfigFetchWaitTime () const |
Returns configured config-fetch-wait-time value. | |
void | merge (const ConfigControlInfo &other) |
Merges specified configuration into this configuration. | |
void | setConfigFetchWaitTime (const util::Optional< uint16_t > &config_fetch_wait_time) |
Sets new value of the config-fetch-wait-time. | |
virtual isc::data::ElementPtr | toElement () const |
Unparse a configuration object. | |
Public Member Functions inherited from isc::data::CfgToElement | |
virtual | ~CfgToElement () |
Destructor. | |
Static Public Member Functions | |
static const ConfigDbInfo & | EMPTY_DB () |
Fetches the not-found value returned by database list searches. | |
Embodies configuration information used during a server's configuration process.
This is class conveys the configuration control information described by the following JSON text:
Definition at line 141 of file config_ctl_info.h.
|
inline |
Constructor.
Definition at line 145 of file config_ctl_info.h.
isc::process::ConfigControlInfo::ConfigControlInfo | ( | const ConfigControlInfo & | other | ) |
Copy Constructor.
Definition at line 48 of file config_ctl_info.cc.
void isc::process::ConfigControlInfo::addConfigDatabase | ( | const std::string & | access_str | ) |
Sets configuration database access string.
access_str | database access string. |
BadValue | if an entry exists that matches the parameters in the given access string, or if the access string is invalid. |
Definition at line 56 of file config_ctl_info.cc.
References isc_throw, and isc::process::ConfigDbInfo::setAccessString().
void isc::process::ConfigControlInfo::clear | ( | ) |
Empties the contents of the class, including the database list.
Definition at line 91 of file config_ctl_info.cc.
|
static |
Fetches the not-found value returned by database list searches.
Definition at line 85 of file config_ctl_info.cc.
Referenced by findConfigDb().
bool isc::process::ConfigControlInfo::equals | ( | const ConfigControlInfo & | other | ) | const |
Compares two objects for equality.
other | An object to be compared with this object. |
Definition at line 122 of file config_ctl_info.cc.
References isc::util::Optional< T >::get().
const ConfigDbInfo & isc::process::ConfigControlInfo::findConfigDb | ( | const std::string & | param_name, |
const std::string & | param_value ) |
Retrieves the database with the given access parameter value.
EMPTY_DB()
. Definition at line 72 of file config_ctl_info.cc.
References EMPTY_DB().
|
inline |
Retrieves the list of databases.
The entries in the list are stored in the order they were added to it (FIFO).
Definition at line 189 of file config_ctl_info.h.
|
inline |
Returns configured config-fetch-wait-time value.
This value specifies the time period in seconds between the attempts to fetch the server configuration updates via the configuration backends. The value of 0 means that the mechanism to periodically fetch the configuration updates is disabled.
Definition at line 171 of file config_ctl_info.h.
void isc::process::ConfigControlInfo::merge | ( | const ConfigControlInfo & | other | ) |
Merges specified configuration into this configuration.
If the other configuration is non-empty it completely replaces this configuration.
other | the other configuration to be merged into this configuration. |
Definition at line 97 of file config_ctl_info.cc.
|
inline |
Sets new value of the config-fetch-wait-time.
config_fetch_wait_time | New value of the parameter which specifies a time period in seconds between the attempts to fetch the server configuration updates. The value of 0 disables the periodic attempts to fetch the updates. |
Definition at line 157 of file config_ctl_info.h.
|
virtual |
Unparse a configuration object.
Implements isc::data::CfgToElement.
Definition at line 104 of file config_ctl_info.cc.
References isc::data::Element::create(), isc::data::Element::createList(), isc::data::Element::createMap(), and isc::util::Optional< T >::unspecified().