7#ifndef HOST_DATA_SOURCE_FACTORY_H
8#define HOST_DATA_SOURCE_FACTORY_H
94 const std::string& dbaccess,
bool if_unusable =
true);
132 bool no_log =
false);
152 static std::map<std::string, std::pair<Factory, DBVersion>> map_;
This is a base class for exceptions thrown from the DNS library module.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
std::map< std::string, std::string > ParameterMap
Database configuration parameter map.
Host Data Source Factory.
static void logRegistered()
Logs out all registered backends.
static bool deregisterFactory(const std::string &db_type, bool no_log=false)
Deregister a host data source factory.
static void add(HostDataSourceList &sources, const std::string &dbaccess)
Create and add an instance of a host data source.
std::function< HostDataSourcePtr(const db::DatabaseConnection::ParameterMap &) Factory)
Type of host data source factory.
static bool registerFactory(const std::string &db_type, const Factory &factory, bool no_log=false, DBVersion db_version=DBVersion())
Register a host data source factory.
static std::list< std::string > getDBVersions()
Return extended version info for registered backends.
static bool del(HostDataSourceList &sources, const std::string &db_type)
Delete a host data source.
static bool registeredFactory(const std::string &db_type)
Check if a host data source factory was registered.
std::function< std::string()> DBVersion
Type of host mgr version.
No host data source instance exception.
NoHostDataSourceManager(const char *file, size_t line, const char *what)
boost::shared_ptr< BaseHostDataSource > HostDataSourcePtr
HostDataSource pointer.
std::vector< HostDataSourcePtr > HostDataSourceList
HostDataSource list.
Defines the logger used by the top-level component of kea-lfc.