NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
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
m_limit = nMaxEntries;
45
this->
evictEntries
();
46
}
47
48
void
49
Policy::afterInsert
(
iterator
i)
50
{
51
BOOST_ASSERT(m_cs !=
nullptr
);
52
this->
doAfterInsert
(i);
53
}
54
55
void
56
Policy::afterRefresh
(
iterator
i)
57
{
58
BOOST_ASSERT(m_cs !=
nullptr
);
59
this->
doAfterRefresh
(i);
60
}
61
62
void
63
Policy::beforeErase
(
iterator
i)
64
{
65
BOOST_ASSERT(m_cs !=
nullptr
);
66
this->
doBeforeErase
(i);
67
}
68
69
void
70
Policy::beforeUse
(
iterator
i)
71
{
72
BOOST_ASSERT(m_cs !=
nullptr
);
73
this->
doBeforeUse
(i);
74
}
75
76
}
// namespace cs
77
}
// 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-2016, 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:63
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
nfd::cs::Policy::beforeUse
void beforeUse(iterator i)
invoked by CS before an entry is used to match a lookup
Definition:
cs-policy.cpp:70
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:49
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:56
ndnSIM
NFD
daemon
table
cs-policy.cpp
Generated on Sat Nov 12 2016 16:02:54 for ndnSIM by
1.8.12