NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: 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; -*- */
22
#include "
in-memory-storage-entry.hpp
"
23
24
namespace
ndn
{
25
namespace
util {
26
27
InMemoryStorageEntry::InMemoryStorageEntry
()
28
: m_isFresh(true)
29
{
30
}
31
32
void
33
InMemoryStorageEntry::release
()
34
{
35
m_dataPacket.reset();
36
m_markStaleEventId.reset();
37
}
38
39
void
40
InMemoryStorageEntry::setData
(
const
Data
& data)
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
53
InMemoryStorageEntry::markStale
()
54
{
55
m_isFresh =
false
;
56
}
57
58
}
// namespace util
59
}
// namespace ndn
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::util::InMemoryStorageEntry::release
void release()
Releases reference counts on shared objects.
Definition:
in-memory-storage-entry.cpp:33
ndn::util::InMemoryStorageEntry::markStale
void markStale()
Disable the data from satisfying interest with MustBeFresh.
Definition:
in-memory-storage-entry.cpp:53
in-memory-storage-entry.hpp
ndn::util::InMemoryStorageEntry::setMarkStaleEventId
void setMarkStaleEventId(unique_ptr< scheduler::ScopedEventId > &&eventId)
Set eventId for the markStale event.
Definition:
in-memory-storage-entry.cpp:47
ndn::util::InMemoryStorageEntry::InMemoryStorageEntry
InMemoryStorageEntry()
Create an entry.
Definition:
in-memory-storage-entry.cpp:27
ndn::Data
represents a Data packet
Definition:
data.hpp:39
ndn::util::InMemoryStorageEntry::setData
void setData(const Data &data)
Changes the content of in-memory storage entry.
Definition:
in-memory-storage-entry.cpp:40
ndnSIM
ndn-cxx
src
util
in-memory-storage-entry.cpp
Generated on Sat Nov 12 2016 16:02:53 for ndnSIM by
1.8.12