Kea 2.7.6
|
Configuration Backend Manager for DHCPv6 servers. More...
#include <config_backend_dhcp6_mgr.h>
Static Public Member Functions | |
static void | create () |
Creates new instance of the ConfigBackendDHCPv6Mgr . | |
static void | destroy () |
Destroys the instance of the ConfigBackendDHCPv6Mgr . | |
static ConfigBackendDHCPv6Mgr & | instance () |
Returns a sole instance of the ConfigBackendDHCPv6Mgr . | |
Additional Inherited Members | |
Public Types inherited from isc::cb::BaseConfigBackendMgr< ConfigBackendPoolDHCPv6 > | |
typedef boost::shared_ptr< ConfigBackendPoolDHCPv6 > | ConfigBackendPoolPtr |
Pointer to the configuration backend pool. | |
typedef std::function< typename ConfigBackendPoolDHCPv6::ConfigBackendTypePtr(const db::DatabaseConnection::ParameterMap &)> | Factory |
Type of the backend factory function. | |
Public Member Functions inherited from isc::cb::BaseConfigBackendMgr< ConfigBackendPoolDHCPv6 > | |
BaseConfigBackendMgr () | |
Constructor. | |
void | addBackend (const std::string &dbaccess) |
Create an instance of a configuration backend. | |
void | delAllBackends () |
Removes all backends from the pool. | |
bool | delBackend (const std::string &db_type, const std::string &dbaccess, bool if_unusable) |
Delete a config backend manager. | |
ConfigBackendPoolPtr | getPool () const |
Returns underlying config backend pool. | |
bool | registerBackendFactory (const std::string &db_type, const Factory &factory) |
Registers new backend factory function for a given backend type. | |
bool | unregisterBackendFactory (const std::string &db_type) |
Unregisters the backend factory function for a given backend type. | |
Protected Attributes inherited from isc::cb::BaseConfigBackendMgr< ConfigBackendPoolDHCPv6 > | |
std::map< std::string, Factory > | factories_ |
A map holding registered backend factory functions. | |
ConfigBackendPoolPtr | pool_ |
Pointer to the configuration backends pool. | |
Configuration Backend Manager for DHCPv6 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 ConfigBackendPoolDHCPv6
for details.
Definition at line 33 of file config_backend_dhcp6_mgr.h.
|
static |
Creates new instance of the ConfigBackendDHCPv6Mgr
.
If an instance of the ConfigBackendDHCPv6Mgr
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_dhcp6_mgr.cc.
Referenced by instance().
|
static |
Destroys the instance of the ConfigBackendDHCPv6Mgr
.
If an instance of the ConfigBackendDHCPv6Mgr
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_dhcp6_mgr.cc.
|
static |
Returns a sole instance of the ConfigBackendDHCPv6Mgr
.
This method should be used to retrieve an instance of the ConfigBackendDHCPv6Mgr
to be used to gather/manage config backends. It returns an instance of the ConfigBackendDHCPv6Mgr
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_dhcp6_mgr.cc.
References create().