![]() |
Kea 3.0.0
|
Pool allocation state used by the FLQ allocator. More...
#include <flq_allocation_state.h>
Public Member Functions | |
| PoolFreeLeaseQueueAllocationState (Lease::Type type) | |
| Constructor. | |
| void | addFreeLease (const asiolink::IOAddress &address) |
| Adds a free lease to the queue. | |
| void | deleteFreeLease (const asiolink::IOAddress &address) |
| Deletes free lease from the queue. | |
| bool | exhausted () const |
| Checks if the pool has run out of free leases. | |
| size_t | getFreeLeaseCount () const |
| Returns the current number of free leases in the queue. | |
| asiolink::IOAddress | offerFreeLease () |
| Returns next available lease. | |
| Public Member Functions inherited from isc::dhcp::AllocationState | |
| virtual | ~AllocationState ()=default |
| Virtual destructor. | |
Static Public Member Functions | |
| static PoolFreeLeaseQueueAllocationStatePtr | create (const PoolPtr &pool) |
| Factory function creating the state instance from a pool. | |
Pool allocation state used by the FLQ allocator.
Definition at line 26 of file flq_allocation_state.h.
| isc::dhcp::PoolFreeLeaseQueueAllocationState::PoolFreeLeaseQueueAllocationState | ( | Lease::Type | type | ) |
Constructor.
Instantiates the allocation state for the specified lease type.
| type | lease type. |
Definition at line 21 of file flq_allocation_state.cc.
References isc::dhcp::Lease::TYPE_V4.
| void isc::dhcp::PoolFreeLeaseQueueAllocationState::addFreeLease | ( | const asiolink::IOAddress & | address | ) |
Adds a free lease to the queue.
| address | lease address. |
Definition at line 37 of file flq_allocation_state.cc.
References isc::asiolink::IOAddress::toUint32().
|
static |
Factory function creating the state instance from a pool.
| pool | instance of the pool for which the allocation state should be instantiated. |
Definition at line 17 of file flq_allocation_state.cc.
Referenced by isc::dhcp::Subnet4::createAllocators(), and isc::dhcp::Subnet6::createAllocators().
| void isc::dhcp::PoolFreeLeaseQueueAllocationState::deleteFreeLease | ( | const asiolink::IOAddress & | address | ) |
Deletes free lease from the queue.
| address | lease address. |
Definition at line 46 of file flq_allocation_state.cc.
References isc::asiolink::IOAddress::toUint32().
| bool isc::dhcp::PoolFreeLeaseQueueAllocationState::exhausted | ( | ) | const |
Checks if the pool has run out of free leases.
Definition at line 31 of file flq_allocation_state.cc.
| size_t isc::dhcp::PoolFreeLeaseQueueAllocationState::getFreeLeaseCount | ( | ) | const |
Returns the current number of free leases in the queue.
Definition at line 78 of file flq_allocation_state.cc.
| IOAddress isc::dhcp::PoolFreeLeaseQueueAllocationState::offerFreeLease | ( | ) |
Returns next available lease.
Definition at line 57 of file flq_allocation_state.cc.
References isc::asiolink::IOAddress::IPV4_ZERO_ADDRESS(), and isc::asiolink::IOAddress::IPV6_ZERO_ADDRESS().