21 MultiThreadingConfigParser::parse(
SrvConfig& srv_cfg,
31 auto enabled = getBoolean(value,
"enable-multi-threading");
34 if (value->get(
"thread-pool-size")) {
35 auto thread_pool_size = getInteger(value,
"thread-pool-size");
36 uint32_t max_size = std::numeric_limits<uint16_t>::max();
37 if (thread_pool_size < 0) {
39 "thread pool size code must not be negative ("
40 << getPosition(
"thread-pool-size", value) <<
")");
42 if (thread_pool_size > max_size) {
44 << thread_pool_size <<
"', it must not be greater than '"
46 << getPosition(
"thread-pool-size", value) <<
")");
51 if (value->get(
"packet-queue-size")) {
52 auto packet_queue_size = getInteger(value,
"packet-queue-size");
53 uint32_t max_size = std::numeric_limits<uint16_t>::max();
54 if (packet_queue_size < 0) {
56 "packet queue size code must not be negative ("
57 << getPosition(
"packet-queue-size", value) <<
")");
59 if (packet_queue_size > max_size) {
61 << packet_queue_size <<
"', it must not be greater than '"
63 << getPosition(
"packet-queue-size", value) <<
")");
68 MultiThreadingMgr::instance().setMode(enabled);
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
To be removed. Please use ConfigError instead.
boost::shared_ptr< const Element > ConstElementPtr
Specifies current DHCP configuration.
Defines the logger used by the top-level component of kea-dhcp-ddns.
void setDHCPMultiThreading(const isc::data::ConstElementPtr dhcp_multi_threading)
Sets information about the dhcp multi threading.