7#ifndef ALLOCATION_STATE_H
8#define ALLOCATION_STATE_H
11#include <boost/scoped_ptr.hpp>
12#include <boost/shared_ptr.hpp>
13#include <boost/date_time/posix_time/posix_time.hpp>
61 boost::posix_time::ptime
73 boost::scoped_ptr<std::mutex>
mutex_;
Base class for representing allocation state in pools and subnets.
virtual ~AllocationState()=default
Virtual destructor.
Common base class for subnet-specific allocation states.
boost::posix_time::ptime last_allocated_time_
Timestamp indicating when a lease has been last allocated from the subnet.
boost::posix_time::ptime getLastAllocatedTime() const
Returns last allocation time for the specified lease type.
boost::scoped_ptr< std::mutex > mutex_
Mutex used for thread-safe access to the state members.
SubnetAllocationState()
Constructor.
void setCurrentAllocatedTimeInternal()
Sets the last allocation time to current.
boost::shared_ptr< AllocationState > AllocationStatePtr
Type of the pointer to the AllocationState.
boost::shared_ptr< SubnetAllocationState > SubnetAllocationStatePtr
Defines the logger used by the top-level component of kea-lfc.