Kea
1.9.9-git
|
Configuration Backend Manager for DHPCv4 servers. More...
#include <config_backend_dhcp4_mgr.h>
Static Public Member Functions | |
static void | create () |
Creates new instance of the ConfigBackendDHCPv4Mgr . More... | |
static void | destroy () |
Destroys the instance of the ConfigBackendDHCPv4Mgr . More... | |
static ConfigBackendDHCPv4Mgr & | instance () |
Returns a sole instance of the ConfigBackendDHCPv4Mgr . More... | |
Additional Inherited Members | |
Public Types inherited from isc::cb::BaseConfigBackendMgr< ConfigBackendPoolDHCPv4 > | |
typedef boost::shared_ptr< ConfigBackendPoolDHCPv4 > | ConfigBackendPoolPtr |
Pointer to the configuration backend pool. More... | |
typedef std::function< typename ConfigBackendPoolDHCPv4::ConfigBackendTypePtr(const db::DatabaseConnection::ParameterMap &)> | Factory |
Type of the backend factory function. More... | |
Public Member Functions inherited from isc::cb::BaseConfigBackendMgr< ConfigBackendPoolDHCPv4 > | |
BaseConfigBackendMgr () | |
Constructor. More... | |
void | addBackend (const std::string &dbaccess) |
Create an instance of a configuration backend. More... | |
void | delAllBackends () |
Removes all backends from the pool. More... | |
bool | delBackend (const std::string &db_type, const std::string &dbaccess, bool if_unusable) |
Delete a config backend manager. More... | |
ConfigBackendPoolPtr | getPool () const |
Returns underlying config backend pool. More... | |
bool | registerBackendFactory (const std::string &db_type, const Factory &factory) |
Registers new backend factory function for a given backend type. More... | |
bool | unregisterBackendFactory (const std::string &db_type) |
Unregisters the backend factory function for a given backend type. More... | |
Protected Attributes inherited from isc::cb::BaseConfigBackendMgr< ConfigBackendPoolDHCPv4 > | |
std::map< std::string, Factory > | factories_ |
A map holding registered backend factory functions. More... | |
ConfigBackendPoolPtr | pool_ |
Pointer to the configuration backends pool. More... | |
Configuration Backend Manager for DHPCv4 servers.
Implements the "manager" class which holds information about the supported and configured backends and provides access to those backends. This is similar to HostMgr
and LeaseMgr
singletons being used by the DHCP servers.
It is implemented as a singleton that can be accessed from any place within the server code. This includes server configuration, data fetching during normal server operation and data management, including processing of control commands implemented within hooks libraries.
Unlike HostMgr
, the it does not directly expose the API to fetch and manipulate the data in the database. This is done via, the Configuration Backend Pool, see ConfigBackendPoolDHCPv4
for details.
Definition at line 33 of file config_backend_dhcp4_mgr.h.
|
static |
Creates new instance of the ConfigBackendDHCPv4Mgr
.
If an instance of the ConfigBackendDHCPv4Mgr
already exists, it will be replaced by the new instance. Thus, all factories will be unregistered and config databases will be dropped.
Definition at line 22 of file config_backend_dhcp4_mgr.cc.
Referenced by instance().
|
static |
Destroys the instance of the ConfigBackendDHCPv4Mgr
.
If an instance of the ConfigBackendDHCPv4Mgr
exists, it will be destroyed. Thus, all factories will be unregistered and config databases will be dropped.
Definition at line 27 of file config_backend_dhcp4_mgr.cc.
|
static |
Returns a sole instance of the ConfigBackendDHCPv4Mgr
.
This method should be used to retrieve an instance of the ConfigBackendDHCPv4Mgr
to be used to gather/manage config backends. It returns an instance of the ConfigBackendDHCPv4Mgr
created by the create
method. If the instance doesn't exist yet, it is created using the create
method with the an empty set of configuration databases.
Definition at line 32 of file config_backend_dhcp4_mgr.cc.
References create().