pit-face-record.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26 #ifndef NFD_DAEMON_TABLE_PIT_FACE_RECORD_HPP
27 #define NFD_DAEMON_TABLE_PIT_FACE_RECORD_HPP
28 
29 #include "face/face.hpp"
30 #include "strategy-info-host.hpp"
31 
32 namespace nfd {
33 namespace pit {
34 
41 {
42 public:
43  explicit
44  FaceRecord(Face& face);
45 
46  Face&
47  getFace() const;
48 
49  uint32_t
50  getLastNonce() const;
51 
52  time::steady_clock::TimePoint
53  getLastRenewed() const;
54 
58  time::steady_clock::TimePoint
59  getExpiry() const;
60 
63  void
64  update(const Interest& interest);
65 
66 private:
67  Face& m_face;
68  uint32_t m_lastNonce;
69  time::steady_clock::TimePoint m_lastRenewed;
70  time::steady_clock::TimePoint m_expiry;
71 };
72 
73 inline Face&
75 {
76  return m_face;
77 }
78 
79 inline uint32_t
81 {
82  return m_lastNonce;
83 }
84 
85 inline time::steady_clock::TimePoint
87 {
88  return m_lastRenewed;
89 }
90 
91 inline time::steady_clock::TimePoint
93 {
94  return m_expiry;
95 }
96 
97 } // namespace pit
98 } // namespace nfd
99 
100 #endif // NFD_DAEMON_TABLE_PIT_FACE_RECORD_HPP
time::steady_clock::TimePoint getLastRenewed() const
void update(const Interest &interest)
updates lastNonce, lastRenewed, expiry fields
base class for an entity onto which StrategyInfo items may be placed
time::steady_clock::TimePoint getExpiry() const
gives the time point this record expires
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
Definition: algorithm.hpp:32
Face & getFace() const
contains information about an Interest on an incoming or outgoing face
uint32_t getLastNonce() const