NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
cs-policy.cpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26
#include "
cs-policy.hpp
"
27
#include "
cs.hpp
"
28
29
namespace
nfd
{
30
namespace
cs {
31
32
Policy::Policy
(
const
std::string& policyName)
33
: m_policyName(policyName)
34
{
35
}
36
37
Policy::~Policy
()
38
{
39
}
40
41
void
42
Policy::setLimit
(
size_t
nMaxEntries)
43
{
44
BOOST_ASSERT(nMaxEntries > 0);
45
m_limit = nMaxEntries;
46
47
this->
evictEntries
();
48
}
49
50
void
51
Policy::afterInsert
(
iterator
i)
52
{
53
BOOST_ASSERT(m_cs !=
nullptr
);
54
this->
doAfterInsert
(i);
55
}
56
57
void
58
Policy::afterRefresh
(
iterator
i)
59
{
60
BOOST_ASSERT(m_cs !=
nullptr
);
61
this->
doAfterRefresh
(i);
62
}
63
64
void
65
Policy::beforeErase
(
iterator
i)
66
{
67
BOOST_ASSERT(m_cs !=
nullptr
);
68
this->
doBeforeErase
(i);
69
}
70
71
void
72
Policy::beforeUse
(
iterator
i)
73
{
74
BOOST_ASSERT(m_cs !=
nullptr
);
75
this->
doBeforeUse
(i);
76
}
77
78
}
// namespace cs
79
}
// namespace nfd
nfd::cs::Policy::evictEntries
virtual void evictEntries()=0
evicts zero or more entries
nfd::cs::Policy::setLimit
void setLimit(size_t nMaxEntries)
sets hard limit (in number of entries)
Definition:
cs-policy.cpp:42
cs.hpp
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
nfd::cs::Policy::doAfterRefresh
virtual void doAfterRefresh(iterator i)=0
invoked after an existing entry is refreshed by same Data
nfd::cs::Policy::doBeforeUse
virtual void doBeforeUse(iterator i)=0
invoked before an entry is used to match a lookup
nfd::cs::Policy::~Policy
virtual ~Policy()
Definition:
cs-policy.cpp:37
nfd::cs::iterator
Table::const_iterator iterator
Definition:
cs-internal.hpp:41
nfd::cs::Policy::beforeErase
void beforeErase(iterator i)
invoked by CS before an entry is erased due to management command
Definition:
cs-policy.cpp:65
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:38
nfd::cs::Policy::beforeUse
void beforeUse(iterator i)
invoked by CS before an entry is used to match a lookup
Definition:
cs-policy.cpp:72
nfd::cs::Policy::doBeforeErase
virtual void doBeforeErase(iterator i)=0
invoked before an entry is erased due to management command
nfd::cs::Policy::afterInsert
void afterInsert(iterator i)
invoked by CS after a new entry is inserted
Definition:
cs-policy.cpp:51
nfd::cs::Policy::doAfterInsert
virtual void doAfterInsert(iterator i)=0
invoked after a new entry is created in CS
nfd::cs::Policy::Policy
Policy(const std::string &policyName)
Definition:
cs-policy.cpp:32
cs-policy.hpp
nfd::cs::Policy::afterRefresh
void afterRefresh(iterator i)
invoked by CS after an existing entry is refreshed by same Data
Definition:
cs-policy.cpp:58
ndnSIM
NFD
daemon
table
cs-policy.cpp
Generated on Tue Feb 23 2016 22:18:44 for ndnSIM by
1.8.11