Kea 2.5.9
isc::cb::BaseConfigBackend Class Referenceabstract

Interface for Kea server specific configuration backend implementations. More...

#include <base_config_backend.h>

+ Inheritance diagram for isc::cb::BaseConfigBackend:

Public Member Functions

virtual ~BaseConfigBackend ()
 Virtual destructor.
 
virtual std::string getHost () const =0
 Returns backend host.
 
virtual isc::db::DatabaseConnection::ParameterMap getParameters () const
 Return backend parameters.
 
virtual uint16_t getPort () const =0
 Returns backend port number.
 
virtual std::string getType () const =0
 Returns backend type in the textual format.
 
virtual bool isUnusable ()
 Flag which indicates if the config backend has an unusable connection.
 

Detailed Description

Interface for Kea server specific configuration backend implementations.

Each Kea server (e.g. DHCPv4 server) needs to implement its own interface to store and fetch its configuration from the databases. This is because each Kea server uses a different set of configuration information. This is a base interface which should be implemented (and extended) by respective Kea servers to provide API to store and fetch configuration information from a database. Such implementation is called configuration backend. Each configuration backend facilitates a single database type, e.g. MySQL database. In order to support multiple database types, i.e. MySQL, PostgreSQL, each Kea server will have to implement 2 separate configuration backends, one for each database type.

Definition at line 34 of file base_config_backend.h.

Constructor & Destructor Documentation

◆ ~BaseConfigBackend()

virtual isc::cb::BaseConfigBackend::~BaseConfigBackend ( )
inlinevirtual

Virtual destructor.

Definition at line 38 of file base_config_backend.h.

Member Function Documentation

◆ getHost()

virtual std::string isc::cb::BaseConfigBackend::getHost ( ) const
pure virtual

Returns backend host.

This is used by the BaseConfigBackendPool to select backend when BackendSelector is specified.

Returns
host on which the database is located.

◆ getParameters()

virtual isc::db::DatabaseConnection::ParameterMap isc::cb::BaseConfigBackend::getParameters ( ) const
inlinevirtual

Return backend parameters.

Returns the backend parameters.

Returns
Parameters of the backend.

Definition at line 76 of file base_config_backend.h.

◆ getPort()

virtual uint16_t isc::cb::BaseConfigBackend::getPort ( ) const
pure virtual

Returns backend port number.

This is used by the BaseConfigBackendPool to select backend when BackendSelector is specified.

Returns
Port number on which database service is available.

◆ getType()

virtual std::string isc::cb::BaseConfigBackend::getType ( ) const
pure virtual

Returns backend type in the textual format.

Returns
Name of the storage for configurations, e.g. "mysql", "postgresql" and so forth.

◆ isUnusable()

virtual bool isc::cb::BaseConfigBackend::isUnusable ( )
inlinevirtual

Flag which indicates if the config backend has an unusable connection.

Returns
true if there is at least one unusable connection, false otherwise.

Definition at line 67 of file base_config_backend.h.


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