Kea  1.5.0
isc::data::StampedElement Class Reference

This class represents configuration element which is associated with the modification timestamp. More...

#include <stamped_element.h>

+ Inheritance diagram for isc::data::StampedElement:

Public Member Functions

 StampedElement ()
 Constructor. More...
 
boost::posix_time::ptime getModificationTime () const
 Returns timestamp. More...
 
void setModificationTime (const boost::posix_time::ptime &timestamp)
 Sets timestamp to the explicitly provided value. More...
 
void updateModificationTime ()
 Sets timestmp to the current time. More...
 

Detailed Description

This class represents configuration element which is associated with the modification timestamp.

Classes storing Kea configuration should derive from this object to track modification times of the configuration objects. This is specifically required by the Kea Configuration Backend feature which stores configuration in the database and must be able to recognize recently modified objects to fetch incremental changes.

Note
This class is not derived from Element and should not be confused with the classes being derived from Element class. Those classes are used to represent JSON structures, whereas this class represents data fetched from the database.
Todo:
Find a better name for StamepedElement.

Definition at line 31 of file stamped_element.h.

Constructor & Destructor Documentation

◆ StampedElement()

isc::data::StampedElement::StampedElement ( )

Constructor.

Sets timestamp to the current time.

Definition at line 12 of file stamped_element.cc.

Member Function Documentation

◆ getModificationTime()

boost::posix_time::ptime isc::data::StampedElement::getModificationTime ( ) const
inline

Returns timestamp.

Definition at line 50 of file stamped_element.h.

◆ setModificationTime()

void isc::data::StampedElement::setModificationTime ( const boost::posix_time::ptime &  timestamp)
inline

Sets timestamp to the explicitly provided value.

Parameters
timestampNew timestamp value.

Definition at line 42 of file stamped_element.h.

Referenced by updateModificationTime().

◆ updateModificationTime()

void isc::data::StampedElement::updateModificationTime ( )

Sets timestmp to the current time.

Definition at line 17 of file stamped_element.cc.

References setModificationTime().

+ Here is the call graph for this function:

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