14#include <boost/foreach.hpp>
28 param =
"reclaim-timer-wait-time";
29 if (expiration_config->contains(param)) {
30 cfg->setReclaimTimerWaitTime(
getInteger(expiration_config, param));
33 param =
"flush-reclaimed-timer-wait-time";
34 if (expiration_config->contains(param)) {
35 cfg->setFlushReclaimedTimerWaitTime(
getInteger(expiration_config,
39 param =
"hold-reclaimed-time";
40 if (expiration_config->contains(param)) {
41 cfg->setHoldReclaimedTime(
getInteger(expiration_config, param));
44 param =
"max-reclaim-leases";
45 if (expiration_config->contains(param)) {
46 cfg->setMaxReclaimLeases(
getInteger(expiration_config, param));
49 param =
"max-reclaim-time";
50 if (expiration_config->contains(param)) {
51 cfg->setMaxReclaimTime(
getInteger(expiration_config, param));
54 param =
"unwarned-reclaim-cycles";
55 if (expiration_config->contains(param)) {
56 cfg->setUnwarnedReclaimCycles(
61 }
catch (
const std::exception& ex) {
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
static const data::Element::Position & getPosition(const std::string &name, const data::ConstElementPtr parent)
Utility method that returns position of an element.
static int64_t getInteger(isc::data::ConstElementPtr scope, const std::string &name)
Returns an integer parameter from a scope.
static CfgMgr & instance()
returns a single instance of Configuration Manager
SrvConfigPtr getStagingCfg()
Returns a pointer to the staging configuration.
To be removed. Please use ConfigError instead.
void parse(isc::data::ConstElementPtr expiration_config)
Parses parameters in the JSON map, pertaining to the processing of the expired leases.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
boost::shared_ptr< const Element > ConstElementPtr
boost::shared_ptr< CfgExpiration > CfgExpirationPtr
Defines the logger used by the top-level component of kea-lfc.