| Kea 3.0.2-git

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

  value | The 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] | value | The multi-threading configuration
  [out] | enabled | The enabled flag
  [out] | thread_count | The thread count
  [out] | queue_size | The 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(), isc::radius::RadiusImpl::startServices(), and isc::ha::HAConfig::validate().

Here is the call graph for this function:

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

- cfg_multi_threading.h
- cfg_multi_threading.cc