Kea 3.1.8
sflq_allocation_state.cc
Go to the documentation of this file.
1// Copyright (C) 2026 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7#include <config.h>
10#include <boost/date_time/posix_time/posix_time.hpp>
11
12using namespace isc::util;
13
14namespace isc {
15namespace dhcp {
16
20
21void
22SubnetSflqAllocationState::setLastAllocatedTime(boost::posix_time::ptime last_time
23 /* = not_a_date_time */) {
25 if (last_time == boost::posix_time::not_a_date_time) {
27 } else {
28 last_allocated_time_ = last_time;
29 }
30}
31
32}
33}
boost::posix_time::ptime last_allocated_time_
Timestamp indicating when a lease has been last allocated from the subnet.
boost::scoped_ptr< std::mutex > mutex_
Mutex used for thread-safe access to the state members.
void setCurrentAllocatedTimeInternal()
Sets the last allocation time to current.
void setLastAllocatedTime(boost::posix_time::ptime last_time=boost::posix_time::not_a_date_time)
Set last allocated time.
Defines the logger used by the top-level component of kea-lfc.
RAII lock object to protect the code in the same scope with a mutex.