Kea 2.7.5
isc::dhcp::ConfigBackendDHCPv4Mgr Class Reference

Configuration Backend Manager for DHCPv4 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.
 
static void destroy ()
 Destroys the instance of the ConfigBackendDHCPv4Mgr.
 
static ConfigBackendDHCPv4Mgrinstance ()
 Returns a sole instance of the ConfigBackendDHCPv4Mgr.
 

Additional Inherited Members

- Public Types inherited from isc::cb::BaseConfigBackendMgr< ConfigBackendPoolDHCPv4 >
typedef boost::shared_ptr< ConfigBackendPoolDHCPv4 > ConfigBackendPoolPtr
 Pointer to the configuration backend pool.
 
typedef std::function< typename ConfigBackendPoolType::ConfigBackendTypePtr(const db::DatabaseConnection::ParameterMap &) Factory)
 Type of the backend factory function.
 
- Public Member Functions inherited from isc::cb::BaseConfigBackendMgr< ConfigBackendPoolDHCPv4 >
 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< ConfigBackendPoolDHCPv4 >
std::map< std::string, Factory > factories_
 A map holding registered backend factory functions.
 
ConfigBackendPoolPtr pool_
 Pointer to the configuration backends pool.
 

Detailed Description

Configuration Backend Manager for DHCPv4 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

◆ create()

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().

◆ destroy()

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.

◆ instance()

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: