Kea 2.7.6
isc::dhcp::CfgMultiThreading Class Reference

Utility class to apply multi threading configurations. More...

#include <cfg_multi_threading.h>

Static Public Member Functions

static void apply (data::ConstElementPtr value)
 apply multi threading configuration
 
static void extract (data::ConstElementPtr value, bool &enabled, uint32_t &thread_count, uint32_t &queue_size)
 Extract multi-threading parameters from a given configuration.
 

Detailed Description

Utility class to apply multi threading configurations.

Definition at line 16 of file cfg_multi_threading.h.

Member Function Documentation

◆ apply()

void isc::dhcp::CfgMultiThreading::apply ( data::ConstElementPtr value)
static

apply multi threading configuration

Parameters
valueThe multi-threading configuration

Definition at line 21 of file cfg_multi_threading.cc.

References isc::util::MultiThreadingMgr::apply(), extract(), and isc::util::MultiThreadingMgr::instance().

Referenced by isc::dhcp::ControlledDhcpv4Srv::processConfig(), and isc::dhcp::ControlledDhcpv6Srv::processConfig().

+ Here is the call graph for this function:

◆ extract()

void isc::dhcp::CfgMultiThreading::extract ( data::ConstElementPtr value,
bool & enabled,
uint32_t & thread_count,
uint32_t & queue_size )
static

Extract multi-threading parameters from a given configuration.

If the configuration does not contain the enable parameter, multi-threading is disabled. This is very useful as a default value for unit tests, so that they are kept simple, and that they can enable multi-threading on their own if it is in their scope to test MT.

Parameters
[in]valueThe multi-threading configuration
[out]enabledThe enabled flag
[out]thread_countThe thread count
[out]queue_sizeThe queue size

Definition at line 31 of file cfg_multi_threading.cc.

References isc::data::SimpleParser::getBoolean(), and isc::data::SimpleParser::getInteger().

Referenced by apply(), isc::dhcp::configureDhcp4Server(), isc::dhcp::configureDhcp6Server(), isc::dhcp::processDhcp4Config(), isc::dhcp::processDhcp6Config(), and isc::ha::HAConfig::validate().

+ Here is the call graph for this function:

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