Kea 3.1.8
isc::dhcp::SubnetSflqAllocationState Class Reference

Subnet allocation state used by the shared-flq allocator. More...

#include <sflq_allocation_state.h>

Inheritance diagram for isc::dhcp::SubnetSflqAllocationState:

Public Member Functions

 SubnetSflqAllocationState ()
 Constructor.
virtual ~SubnetSflqAllocationState ()
 Destructor.
void setLastAllocatedTime (boost::posix_time::ptime last_time=boost::posix_time::not_a_date_time)
 Set last allocated time.
Public Member Functions inherited from isc::dhcp::SubnetAllocationState
 SubnetAllocationState ()
 Constructor.
boost::posix_time::ptime getLastAllocatedTime () const
 Returns last allocation time for the specified lease type.
Public Member Functions inherited from isc::dhcp::AllocationState
virtual ~AllocationState ()=default
 Virtual destructor.

Additional Inherited Members

Protected Member Functions inherited from isc::dhcp::SubnetAllocationState
void setCurrentAllocatedTimeInternal ()
 Sets the last allocation time to current.
Protected Attributes inherited from isc::dhcp::SubnetAllocationState
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.

Detailed Description

Subnet allocation state used by the shared-flq allocator.

It exposes the base class mechanism to store the last allocation time for various lease types. These times are used by the shared networks to find the "preferred" subnet (i.e., a subnet from which the latest lease was assigned).

Definition at line 33 of file sflq_allocation_state.h.

Constructor & Destructor Documentation

◆ SubnetSflqAllocationState()

isc::dhcp::SubnetSflqAllocationState::SubnetSflqAllocationState ( )

Constructor.

Definition at line 17 of file sflq_allocation_state.cc.

References isc::dhcp::SubnetAllocationState::SubnetAllocationState().

Here is the call graph for this function:

◆ ~SubnetSflqAllocationState()

virtual isc::dhcp::SubnetSflqAllocationState::~SubnetSflqAllocationState ( )
inlinevirtual

Destructor.

Definition at line 40 of file sflq_allocation_state.h.

Member Function Documentation

◆ setLastAllocatedTime()

void isc::dhcp::SubnetSflqAllocationState::setLastAllocatedTime ( boost::posix_time::ptime last_time = boost::posix_time::not_a_date_time)

Set last allocated time.

Parameters
last_timetime of last allocation. If not specified it is set to the current time.

Definition at line 22 of file sflq_allocation_state.cc.

References isc::dhcp::SubnetAllocationState::last_allocated_time_, isc::dhcp::SubnetAllocationState::mutex_, and isc::dhcp::SubnetAllocationState::setCurrentAllocatedTimeInternal().

Here is the call graph for this function:

The documentation for this class was generated from the following files: