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 ("
42 if (thread_pool_size > max_size) {
44 << thread_pool_size <<
"', it must not be greater than '"
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 ("
59 if (packet_queue_size > max_size) {
61 << packet_queue_size <<
"', it must not be greater than '"
68 MultiThreadingMgr::instance().setMode(enabled);
static const data::Element::Position & getPosition(const std::string &name, const data::ConstElementPtr parent)
Utility method that returns position of an element.
static bool getBoolean(isc::data::ConstElementPtr scope, const std::string &name)
Returns a boolean parameter from a scope.
static int64_t getInteger(isc::data::ConstElementPtr scope, const std::string &name)
Returns an integer parameter from a scope.
To be removed. Please use ConfigError instead.
void parse(SrvConfig &srv_cfg, const isc::data::ConstElementPtr &value)
parses JSON structure.
Specifies current DHCP configuration.
void setDHCPMultiThreading(const isc::data::ConstElementPtr dhcp_multi_threading)
Sets information about the dhcp multi threading.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
boost::shared_ptr< const Element > ConstElementPtr
Defines the logger used by the top-level component of kea-lfc.