Kea  1.9.9-git
isc::dhcp::CBControlDHCP< ConfigBackendMgrType > Class Template Reference

Base class for implementing mechanisms to control the use of the Configuration Backends by DHCPv4 and DHCPv6 servers. More...

#include <cb_ctl_dhcp.h>

+ Inheritance diagram for isc::dhcp::CBControlDHCP< ConfigBackendMgrType >:

Public Member Functions

 CBControlDHCP ()
 Constructor. More...
 
- Public Member Functions inherited from isc::process::CBControlBase< ConfigBackendMgrType >
 CBControlBase ()
 Constructor. More...
 
virtual ~CBControlBase ()
 Virtual destructor. More...
 
bool databaseConfigConnect (const ConfigPtr &srv_cfg)
 (Re)connects to the specified configuration backends. More...
 
void databaseConfigDisconnect ()
 Disconnects from the configuration backends. More...
 
virtual void databaseConfigFetch (const ConfigPtr &srv_cfg, const FetchMode &fetch_mode=FetchMode::FETCH_ALL)
 Fetches the entire or partial configuration from the database. More...
 
void reset ()
 Resets the state of this object. More...
 

Protected Member Functions

void addGlobalsToConfig (SrvConfigPtr external_cfg, data::StampedValueCollection &cb_globals) const
 Adds globals fetched from config backend(s) to a SrvConfig instance. More...
 
- Protected Member Functions inherited from isc::process::CBControlBase< ConfigBackendMgrType >
virtual void databaseConfigApply (const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector, const boost::posix_time::ptime &lb_modification_time, const db::AuditEntryCollection &audit_entries)=0
 Server specific method to fetch and apply back end configuration into the local configuration. More...
 
db::AuditEntryCollection fetchConfigElement (const db::AuditEntryCollection &audit_entries, const std::string &object_type) const
 Returns audit entries for new or updated configuration elements of specific type to be fetched from the database. More...
 
ConfigBackendMgrType & getMgr () const
 Returns the instance of the Config Backend Manager used by this object. More...
 
void updateLastAuditRevisionTimeId (const db::AuditEntryCollection &audit_entries)
 Updates timestamp of the most recent audit entry fetched from the database. More...
 

Additional Inherited Members

- Public Types inherited from isc::process::CBControlBase< ConfigBackendMgrType >
enum  FetchMode { FetchMode::FETCH_ALL, FetchMode::FETCH_UPDATE }
 Fetch mode used in invocations to databaseConfigFetch. More...
 
- Static Protected Member Functions inherited from isc::process::CBControlBase< ConfigBackendMgrType >
static boost::posix_time::ptime getInitialAuditRevisionTime ()
 Convenience method returning initial timestamp to set the last_audit_revision_time_ to. More...
 
- Protected Attributes inherited from isc::process::CBControlBase< ConfigBackendMgrType >
uint64_t last_audit_revision_id_
 Stores the most recent audit revision identifier. More...
 
boost::posix_time::ptime last_audit_revision_time_
 Stores the most recent audit revision timestamp. More...
 

Detailed Description

template<typename ConfigBackendMgrType>
class isc::dhcp::CBControlDHCP< ConfigBackendMgrType >

Base class for implementing mechanisms to control the use of the Configuration Backends by DHCPv4 and DHCPv6 servers.

It includes common methods used by the DHCPv4 and DHCPv6 specific derivations.

Template Parameters
ConfigBackendMgrTypeType of the Config Backend Manager used by the server implementing this class. For example, for the DHCPv4 server it will be ConfigBackendDHCPv4Mgr.

Definition at line 27 of file cb_ctl_dhcp.h.

Constructor & Destructor Documentation

template<typename ConfigBackendMgrType>
isc::dhcp::CBControlDHCP< ConfigBackendMgrType >::CBControlDHCP ( )
inline

Constructor.

Definition at line 31 of file cb_ctl_dhcp.h.

Member Function Documentation

template<typename ConfigBackendMgrType>
void isc::dhcp::CBControlDHCP< ConfigBackendMgrType >::addGlobalsToConfig ( SrvConfigPtr  external_cfg,
data::StampedValueCollection cb_globals 
) const
inlineprotected

Adds globals fetched from config backend(s) to a SrvConfig instance.

Iterates over the given collection of global parameters and adds them to the given configuration's list of configured globals.

Parameters
external_cfgSrvConfig instance to update
cb_globalscollection of global parameters supplied by configuration backend

Definition at line 45 of file cb_ctl_dhcp.h.


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