Kea 2.7.6
|
This class represents configuration element which is associated with database identifier and the modification timestamp. More...
#include <base_stamped_element.h>
Public Member Functions | |
BaseStampedElement () | |
Constructor. | |
uint64_t | getId () const |
Returns element's database identifier. | |
boost::posix_time::ptime | getModificationTime () const |
Returns timestamp. | |
void | setId (const uint64_t id) |
Sets element's database identifier. | |
void | setModificationTime (const boost::posix_time::ptime ×tamp) |
Sets timestamp to the explicitly provided value. | |
void | updateModificationTime () |
Sets timestamp to the current time. | |
Protected Attributes | |
uint64_t | id_ |
Database identifier of the configuration element. | |
boost::posix_time::ptime | timestamp_ |
Holds timestamp value. | |
This class represents configuration element which is associated with database identifier and the modification timestamp.
The StampedElement
class derives from this class to extend it with the capability to associate the configuration elements with server tags. The db::Server
class derives from it to store a single server tag identifying a server it describes.
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. Definition at line 30 of file base_stamped_element.h.
isc::data::BaseStampedElement::BaseStampedElement | ( | ) |
Constructor.
Sets timestamp to the current time.
Definition at line 14 of file base_stamped_element.cc.
|
inline |
Returns element's database identifier.
Definition at line 46 of file base_stamped_element.h.
References id_.
|
inline |
|
inline |
Sets element's database identifier.
id | New id. |
Definition at line 41 of file base_stamped_element.h.
References id_.
|
inline |
Sets timestamp to the explicitly provided value.
timestamp | New timestamp value. |
Definition at line 53 of file base_stamped_element.h.
References timestamp_.
Referenced by updateModificationTime().
void isc::data::BaseStampedElement::updateModificationTime | ( | ) |
Sets timestamp to the current time.
Definition at line 21 of file base_stamped_element.cc.
References setModificationTime().
|
protected |
Database identifier of the configuration element.
The default value of 0 indicates that the identifier is not set.
Definition at line 71 of file base_stamped_element.h.
|
protected |
Holds timestamp value.
Definition at line 74 of file base_stamped_element.h.
Referenced by getModificationTime(), and setModificationTime().