NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
in-memory-storage-entry.cpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
23 
24 namespace ndn {
25 namespace util {
26 
28  : m_isFresh(true)
29 {
30 }
31 
32 void
34 {
35  m_dataPacket.reset();
36  m_markStaleEventId.reset();
37 }
38 
39 void
41 {
42  m_dataPacket = data.shared_from_this();
43  m_isFresh = true;
44 }
45 
46 void
47 InMemoryStorageEntry::setMarkStaleEventId(unique_ptr<scheduler::ScopedEventId>&& markStaleEventId)
48 {
49  m_markStaleEventId = std::move(markStaleEventId);
50 }
51 
52 void
54 {
55  m_isFresh = false;
56 }
57 
58 } // namespace util
59 } // namespace ndn
Copyright (c) 2011-2015 Regents of the University of California.
void release()
Releases reference counts on shared objects.
void markStale()
Disable the data from satisfying interest with MustBeFresh.
void setMarkStaleEventId(unique_ptr< scheduler::ScopedEventId > &&eventId)
Set eventId for the markStale event.
represents a Data packet
Definition: data.hpp:37
void setData(const Data &data)
Changes the content of in-memory storage entry.