mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-30 13:37:55 +00:00
[#2436] Remove class lease recount definitions from LeaseMgr
This commit is contained in:
@@ -792,24 +792,6 @@ public:
|
||||
return (io_service_);
|
||||
}
|
||||
|
||||
/// @brief Recount the leases per class for V4 leases.
|
||||
///
|
||||
/// Clears the current class-lease counts and then iterates
|
||||
/// over existing leases, retabulating counts based on class
|
||||
/// lists in each lease user-context.
|
||||
///
|
||||
/// For RDBMs back ends this is a NOP.
|
||||
virtual void recountClassLeases4() {}
|
||||
|
||||
/// @brief Recount the leases per class for V6 leases.
|
||||
///
|
||||
/// Clears the current class-lease counts and then iterates
|
||||
/// over existing leases, retabulating counts based on class
|
||||
/// lists in each lease user-context.
|
||||
///
|
||||
/// For RDBMs back ends this is a NOP.
|
||||
virtual void recountClassLeases6() {}
|
||||
|
||||
/// @brief Returns the class lease count for a given class and lease type.
|
||||
///
|
||||
/// @param client_class client class for which the count is desired
|
||||
|
@@ -2084,6 +2084,7 @@ Memfile_LeaseMgr::wipeLeases6(const SubnetID& subnet_id) {
|
||||
|
||||
void
|
||||
Memfile_LeaseMgr::recountClassLeases4() {
|
||||
class_lease_counter_.clear();
|
||||
auto & idx = storage4_.get<AddressIndexTag>();
|
||||
|
||||
auto lower = idx.begin();
|
||||
@@ -2099,6 +2100,7 @@ Memfile_LeaseMgr::recountClassLeases4() {
|
||||
|
||||
void
|
||||
Memfile_LeaseMgr::recountClassLeases6() {
|
||||
class_lease_counter_.clear();
|
||||
auto & idx = storage6_.get<AddressIndexTag>();
|
||||
|
||||
auto lower = idx.begin();
|
||||
|
@@ -1219,6 +1219,13 @@ private:
|
||||
ClassLeaseCounter class_lease_counter_;
|
||||
|
||||
public:
|
||||
/// @brief Returns the class lease count for a given class and lease type.
|
||||
///
|
||||
/// @param client_class client class for which the count is desired
|
||||
/// @param ltype type of lease for which the count is desired. Defaults to
|
||||
/// Lease::TYPE_V4.
|
||||
virtual size_t getClassLeaseCount(const ClientClass& client_class,
|
||||
const Lease::Type& ltype = Lease::TYPE_V4);
|
||||
|
||||
/// @brief Recount the leases per class for V4 leases.
|
||||
///
|
||||
@@ -1232,15 +1239,7 @@ public:
|
||||
/// Clears the current class-lease count map and then iterates
|
||||
/// over all, retabulating counts based on class lists in each lease
|
||||
/// user-context.
|
||||
virtual void recountClassLeases6();
|
||||
|
||||
/// @brief Returns the class lease count for a given class and lease type.
|
||||
///
|
||||
/// @param client_class client class for which the count is desired
|
||||
/// @param ltype type of lease for which the count is desired. Defaults to
|
||||
/// Lease::TYPE_V4.
|
||||
virtual size_t getClassLeaseCount(const ClientClass& client_class,
|
||||
const Lease::Type& ltype = Lease::TYPE_V4);
|
||||
void recountClassLeases6();
|
||||
|
||||
/// @brief Clears the class-lease count map.
|
||||
void clearClassLeaseCounts();
|
||||
|
Reference in New Issue
Block a user