Kea  1.9.9-git
isc::dhcp::ConfigBackendDHCPv4Mgr Class Reference

Configuration Backend Manager for DHPCv4 servers. More...

#include <config_backend_dhcp4_mgr.h>

+ Inheritance diagram for isc::dhcp::ConfigBackendDHCPv4Mgr:

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 ConfigBackendDHCPv4Mgrinstance ()
 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, Factoryfactories_
 A map holding registered backend factory functions. More...
 
ConfigBackendPoolPtr pool_
 Pointer to the configuration backends pool. More...
 

Detailed Description

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.

Member Function Documentation

void isc::dhcp::ConfigBackendDHCPv4Mgr::create ( )
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().

void isc::dhcp::ConfigBackendDHCPv4Mgr::destroy ( )
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.

ConfigBackendDHCPv4Mgr & isc::dhcp::ConfigBackendDHCPv4Mgr::instance ( )
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().

+ Here is the call graph for this function:


The documentation for this class was generated from the following files: