28 std::numeric_limits<uint16_t>::max();
30 std::numeric_limits<uint16_t>::max();
32 std::numeric_limits<uint32_t>::max();
34 std::numeric_limits<uint32_t>::max();
37 std::numeric_limits<uint16_t>::max();
41 "reclaim-expired-leases";
44 "flush-reclaimed-leases";
47 : reclaim_timer_wait_time_(DEFAULT_RECLAIM_TIMER_WAIT_TIME),
48 flush_reclaimed_timer_wait_time_(DEFAULT_FLUSH_RECLAIMED_TIMER_WAIT_TIME),
49 hold_reclaimed_time_(DEFAULT_HOLD_RECLAIMED_TIME),
50 max_reclaim_leases_(DEFAULT_MAX_RECLAIM_LEASES),
51 max_reclaim_time_(DEFAULT_MAX_RECLAIM_TIME),
52 unwarned_reclaim_cycles_(DEFAULT_UNWARNED_RECLAIM_CYCLES),
54 test_mode_(test_mode) {
60 "reclaim-timer-wait-time");
61 reclaim_timer_wait_time_ = reclaim_timer_wait_time;
67 "flush-reclaimed-timer-wait-time");
68 flush_reclaimed_timer_wait_time_ = flush_reclaimed_wait_time;
74 hold_reclaimed_time_ = hold_reclaimed_time;
80 max_reclaim_leases_ = max_reclaim_leases;
86 max_reclaim_time_ = max_reclaim_time;
92 "unwarned-reclaim-cycles");
93 unwarned_reclaim_cycles_ = unwarned_reclaim_cycles;
97CfgExpiration::rangeCheck(
const int64_t value,
const uint64_t max_value,
98 const std::string& config_parameter_name)
const {
101 << config_parameter_name <<
"' must not be negative");
103 }
else if (value > max_value) {
105 " parameter '" << config_parameter_name <<
"', expected maximum"
106 " value of '" << max_value <<
"'");
114 result->set(
"reclaim-timer-wait-time",
116 (reclaim_timer_wait_time_)));
118 result->set(
"flush-reclaimed-timer-wait-time",
120 (flush_reclaimed_timer_wait_time_)));
122 result->set(
"hold-reclaimed-time",
124 (hold_reclaimed_time_)));
126 result->set(
"max-reclaim-leases",
128 (max_reclaim_leases_)));
130 result->set(
"max-reclaim-time",
132 (max_reclaim_time_)));
134 result->set(
"unwarned-reclaim-cycles",
136 (unwarned_reclaim_cycles_)));
A generic exception that is thrown if a parameter given to a method would refer to or modify out-of-r...
static ElementPtr create(const Position &pos=ZERO_POSITION())
static ElementPtr createMap(const Position &pos=ZERO_POSITION())
Creates an empty MapElement type ElementPtr.
void setReclaimTimerWaitTime(const int64_t reclaim_timer_wait_time)
Sets reclaim-timer-wait-time.
static const uint16_t LIMIT_FLUSH_RECLAIMED_TIMER_WAIT_TIME
Maximum value for flush-reclaimed-timer-wait-time.
static const std::string FLUSH_RECLAIMED_TIMER_NAME
Name of the timer for flushing reclaimed leases.
void setMaxReclaimLeases(const int64_t max_reclaim_leases)
Sets max-reclaim-leases.
void setUnwarnedReclaimCycles(const int64_t unwarned_reclaim_cycles)
Sets unwarned-reclaim-cycles.
static const uint32_t LIMIT_MAX_RECLAIM_LEASES
Maximum value for max-reclaim-leases.
void setHoldReclaimedTime(const int64_t hold_reclaimed_time)
Sets hold-reclaimed-time.
static const uint16_t DEFAULT_RECLAIM_TIMER_WAIT_TIME
Default value for reclaim-timer-wait-time.
static const uint16_t LIMIT_UNWARNED_RECLAIM_CYCLES
Maximum value for unwarned-reclaim-cycles.
static const uint16_t LIMIT_RECLAIM_TIMER_WAIT_TIME
Maximum value for reclaim-timer-wait-time.
static const uint32_t LIMIT_HOLD_RECLAIMED_TIME
Maximum value for hold-reclaimed-time.
CfgExpiration(const bool test_mode=false)
Constructor.
static const uint16_t DEFAULT_UNWARNED_RECLAIM_CYCLES
Default value for unwarned-reclaim-cycles.
void setMaxReclaimTime(const int64_t max_reclaim_time)
Sets max-reclaim-time.
static const uint16_t DEFAULT_FLUSH_RECLAIMED_TIMER_WAIT_TIME
Default value for flush-reclaimed-timer-wait-time.
static const uint16_t DEFAULT_MAX_RECLAIM_TIME
Default value for max-reclaim-time.
virtual isc::data::ElementPtr toElement() const
Unparse a configuration object.
static const uint16_t LIMIT_MAX_RECLAIM_TIME
Default value for max-reclaim-time.
static const std::string RECLAIM_EXPIRED_TIMER_NAME
Name of the timer for reclaiming expired leases.
void setFlushReclaimedTimerWaitTime(const int64_t flush_reclaimed_wait_time)
Sets flush-reclaimed-timer-wait-time.
static const uint32_t DEFAULT_HOLD_RECLAIMED_TIME
Default value for hold-reclaimed-time.
static const uint32_t DEFAULT_MAX_RECLAIM_LEASES
Default value for max-reclaim-leases.
Manages a pool of asynchronous interval timers.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
boost::shared_ptr< Element > ElementPtr
Defines the logger used by the top-level component of kea-lfc.