18 access_str_ = access_str;
19 access_params_.clear();
27 return (access_params_ == other.access_params_);
37 auto param = access_params_.find(name);
38 if (param == access_params_.end()) {
42 value = param->second;
49 : config_fetch_wait_time_(other.config_fetch_wait_time_) {
50 for (
auto const& db : other.db_infos_) {
60 for (
auto const& db : db_infos_) {
64 << access_str <<
" already exists");
68 db_infos_.push_back(new_db);
73 const std::string& param_value) {
74 for (
auto const& db : db_infos_) {
76 if (db.getParameterValue(param_name, db_value) && (param_value == db_value)) {
93 config_fetch_wait_time_ = Optional<uint16_t>(30,
true);
98 if (!other.db_infos_.empty()) {
99 db_infos_ = other.db_infos_;
107 for (
auto const& db_info : db_infos_) {
108 db_list->add(db_info.toElement());
111 result->set(
"config-databases", db_list);
114 result->set(
"config-fetch-wait-time",
123 return ((db_infos_ == other.db_infos_) &&
124 (config_fetch_wait_time_.
get() == other.config_fetch_wait_time_.get()));
A generic exception that is thrown if a parameter given to a method is considered invalid in that con...
static ElementPtr create(const Position &pos=ZERO_POSITION())
static ElementPtr createMap(const Position &pos=ZERO_POSITION())
Creates an empty MapElement type ElementPtr.
static ElementPtr createList(const Position &pos=ZERO_POSITION())
Creates an empty ListElement type ElementPtr.
static isc::data::ElementPtr toElementDbAccessString(const std::string &dbaccess)
Unparse an access string.
static ParameterMap parse(const std::string &dbaccess)
Parse database access string.
Embodies configuration information used during a server's configuration process.
static const ConfigDbInfo & EMPTY_DB()
Fetches the not-found value returned by database list searches.
void merge(const ConfigControlInfo &other)
Merges specified configuration into this configuration.
virtual isc::data::ElementPtr toElement() const
Unparse a configuration object.
ConfigControlInfo()
Constructor.
void addConfigDatabase(const std::string &access_str)
Sets configuration database access string.
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.
void clear()
Empties the contents of the class, including the database list.
Provides configuration information used during a server's configuration process.
bool equals(const ConfigDbInfo &other) const
Compares two objects for equality.
bool getParameterValue(const std::string &name, std::string &value) const
Fetch the value of a given parameter.
virtual isc::data::ElementPtr toElement() const
Unparse a configuration object.
void setAccessString(const std::string &access_str, bool test_mode=false)
Set the access string.
T get() const
Retrieves the encapsulated value.
void unspecified(bool unspecified)
Modifies the flag that indicates whether the value is specified or unspecified.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
boost::shared_ptr< Element > ElementPtr
Defines the logger used by the top-level component of kea-lfc.