Kea 2.5.9
base_stamped_element.h
Go to the documentation of this file.
1// Copyright (C) 2019,2021 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7#ifndef BASE_STAMPED_ELEMENT_H
8#define BASE_STAMPED_ELEMENT_H
9
10#include <cc/data.h>
11#include <boost/date_time/posix_time/posix_time.hpp>
12#include <cstdint>
13
14namespace isc {
15namespace data {
16
31public:
32
37
41 void setId(const uint64_t id) {
42 id_ = id;
43 }
44
46 uint64_t getId() const {
47 return (id_);
48 }
49
53 void setModificationTime(const boost::posix_time::ptime& timestamp) {
54 timestamp_ = timestamp;
55 }
56
59
61 boost::posix_time::ptime getModificationTime() const {
62 return (timestamp_);
63 }
64
65protected:
66
71 uint64_t id_;
72
74 boost::posix_time::ptime timestamp_;
75};
76
77} // end of namespace isc::data
78} // end of namespace isc
79
80#endif
This class represents configuration element which is associated with database identifier and the modi...
boost::posix_time::ptime getModificationTime() const
Returns timestamp.
void updateModificationTime()
Sets timestamp to the current time.
uint64_t id_
Database identifier of the configuration element.
uint64_t getId() const
Returns element's database identifier.
void setModificationTime(const boost::posix_time::ptime &timestamp)
Sets timestamp to the explicitly provided value.
void setId(const uint64_t id)
Sets element's database identifier.
boost::posix_time::ptime timestamp_
Holds timestamp value.
Defines the logger used by the top-level component of kea-lfc.