NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
in-memory-storage-entry.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
#ifndef NDN_UTIL_IN_MEMORY_STORAGE_ENTRY_HPP
23
#define NDN_UTIL_IN_MEMORY_STORAGE_ENTRY_HPP
24
25
#include "../common.hpp"
26
#include "../interest.hpp"
27
#include "../data.hpp"
28
#include "
scheduler-scoped-event-id.hpp
"
29
30
namespace
ndn
{
31
namespace
util {
32
35
class
InMemoryStorageEntry
: noncopyable
36
{
37
public
:
38
41
InMemoryStorageEntry
();
42
45
void
46
release
();
47
50
const
Name
&
51
getName
()
const
52
{
53
return
m_dataPacket->getName();
54
}
55
59
const
Name
&
60
getFullName
()
const
61
{
62
return
m_dataPacket->getFullName();
63
}
64
65
68
const
Data
&
69
getData
()
const
70
{
71
return
*m_dataPacket;
72
}
73
74
79
void
80
setData
(
const
Data
& data);
81
84
void
85
setMarkStaleEventId
(unique_ptr<scheduler::ScopedEventId>&& eventId);
86
89
void
90
markStale
();
91
94
bool
95
isFresh
()
96
{
97
return
m_isFresh;
98
}
99
100
private
:
101
shared_ptr<const Data> m_dataPacket;
102
103
bool
m_isFresh;
104
unique_ptr<scheduler::ScopedEventId> m_markStaleEventId;
105
};
106
107
}
// namespace util
108
}
// namespace ndn
109
110
#endif // NDN_UTIL_IN_MEMORY_STORAGE_ENTRY_HPP
ndn::util::InMemoryStorageEntry::getData
const Data & getData() const
Returns the Data packet stored in the in-memory storage entry.
Definition:
in-memory-storage-entry.hpp:69
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::getFullName
const Name & getFullName() const
Returns the full name (including implicit digest) of the Data packet stored in the in-memory storage ...
Definition:
in-memory-storage-entry.hpp:60
ndn::util::InMemoryStorageEntry::markStale
void markStale()
Disable the data from satisfying interest with MustBeFresh.
Definition:
in-memory-storage-entry.cpp:53
scheduler-scoped-event-id.hpp
ndn::util::InMemoryStorageEntry::getName
const Name & getName() const
Returns the name of the Data packet stored in the in-memory storage entry.
Definition:
in-memory-storage-entry.hpp:51
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
Represents an in-memory storage entry.
Definition:
in-memory-storage-entry.hpp:35
ndn::Name
Name abstraction to represent an absolute name.
Definition:
name.hpp:46
ndn::util::InMemoryStorageEntry::InMemoryStorageEntry
InMemoryStorageEntry()
Create an entry.
Definition:
in-memory-storage-entry.cpp:27
ndn::Data
represents a Data packet
Definition:
data.hpp:37
ndn::util::InMemoryStorageEntry::setData
void setData(const Data &data)
Changes the content of in-memory storage entry.
Definition:
in-memory-storage-entry.cpp:40
ndn::util::InMemoryStorageEntry::isFresh
bool isFresh()
Check if the data can satisfy an interest with MustBeFresh.
Definition:
in-memory-storage-entry.hpp:95
ndnSIM
ndn-cxx
src
util
in-memory-storage-entry.hpp
Generated on Wed Jan 11 2017 18:17:14 for ndnSIM by
1.8.13