Skip to content

Commit 8fbcc64

Browse files
committed
model: Remove deprecated "old" content store policies
Use policies and policy interface provided by NFD Change-Id: I6d4b06225114d1680c9ff3c17b2616298959b0dc
1 parent 5a80831 commit 8fbcc64

37 files changed

+6
-5216
lines changed

bindings/modulegen__gcc_ILP32.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,6 @@ def reg_stackhelper(cls):
9191
param('const std::string&', 'attr4', default_value='""'), param('const std::string&', 'value4', default_value='""')])
9292

9393
cls.add_method('setCsSize', retval('void'), [param('size_t', 'maxSize')])
94-
cls.add_method('SetOldContentStore',
95-
retval('void'),
96-
[param('const std::string&', 'contentStoreClass'),
97-
param('const std::string&', 'attr1', default_value='""'), param('const std::string&', 'value1', default_value='""'),
98-
param('const std::string&', 'attr2', default_value='""'), param('const std::string&', 'value2', default_value='""'),
99-
param('const std::string&', 'attr3', default_value='""'), param('const std::string&', 'value3', default_value='""'),
100-
param('const std::string&', 'attr4', default_value='""'), param('const std::string&', 'value4', default_value='""')])
10194
reg_stackhelper(root_module['ns3::ndn::StackHelper'])
10295

10396
def reg_fibhelper(cls):

bindings/modulegen__gcc_LP64.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,6 @@ def reg_stackhelper(cls):
9191
param('const std::string&', 'attr4', default_value='""'), param('const std::string&', 'value4', default_value='""')])
9292

9393
cls.add_method('setCsSize', retval('void'), [param('size_t', 'maxSize')])
94-
cls.add_method('SetOldContentStore',
95-
retval('void'),
96-
[param('const std::string&', 'contentStoreClass'),
97-
param('const std::string&', 'attr1', default_value='""'), param('const std::string&', 'value1', default_value='""'),
98-
param('const std::string&', 'attr2', default_value='""'), param('const std::string&', 'value2', default_value='""'),
99-
param('const std::string&', 'attr3', default_value='""'), param('const std::string&', 'value3', default_value='""'),
100-
param('const std::string&', 'attr4', default_value='""'), param('const std::string&', 'value4', default_value='""')])
10194
reg_stackhelper(root_module['ns3::ndn::StackHelper'])
10295

10396
def reg_fibhelper(cls):

helper/ndn-stack-helper.cpp

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
#include "model/ndn-net-device-transport.hpp"
3636
#include "utils/ndn-time.hpp"
3737
#include "utils/dummy-keychain.hpp"
38-
#include "model/cs/ndn-content-store.hpp"
3938

4039
#include <limits>
4140
#include <map>
@@ -64,7 +63,6 @@ StackHelper::StackHelper()
6463
m_csPolicyCreationFunc = m_csPolicies["nfd::cs::lru"];
6564

6665
m_ndnFactory.SetTypeId("ns3::ndn::L3Protocol");
67-
m_contentStoreFactory.SetTypeId("ns3::ndn::cs::Lru");
6866

6967
m_netDeviceCallbacks.push_back(
7068
std::make_pair(PointToPointNetDevice::GetTypeId(),
@@ -113,26 +111,6 @@ StackHelper::SetStackAttributes(const std::string& attr1, const std::string& val
113111
m_ndnFactory.Set(attr4, StringValue(value4));
114112
}
115113

116-
void
117-
StackHelper::SetOldContentStore(const std::string& contentStore, const std::string& attr1,
118-
const std::string& value1, const std::string& attr2,
119-
const std::string& value2, const std::string& attr3,
120-
const std::string& value3, const std::string& attr4,
121-
const std::string& value4)
122-
{
123-
m_maxCsSize = 0;
124-
125-
m_contentStoreFactory.SetTypeId(contentStore);
126-
if (attr1 != "")
127-
m_contentStoreFactory.Set(attr1, StringValue(value1));
128-
if (attr2 != "")
129-
m_contentStoreFactory.Set(attr2, StringValue(value2));
130-
if (attr3 != "")
131-
m_contentStoreFactory.Set(attr3, StringValue(value3));
132-
if (attr4 != "")
133-
m_contentStoreFactory.Set(attr4, StringValue(value4));
134-
}
135-
136114
void
137115
StackHelper::setCsSize(size_t maxSize)
138116
{
@@ -197,14 +175,7 @@ StackHelper::doInstall(Ptr<Node> node) const
197175

198176
ndn->getConfig().put("tables.cs_max_packets", (m_maxCsSize == 0) ? 1 : m_maxCsSize);
199177

200-
// Create and aggregate content store if NFD's contest store has been disabled
201-
if (m_maxCsSize == 0) {
202-
ndn->AggregateObject(m_contentStoreFactory.Create<ContentStore>());
203-
}
204-
// if NFD's CS is enabled, check if a replacement policy has been specified
205-
else {
206-
ndn->setCsReplacementPolicy(m_csPolicyCreationFunc);
207-
}
178+
ndn->setCsReplacementPolicy(m_csPolicyCreationFunc);
208179

209180
// Aggregate L3Protocol on node (must be after setting ndnSIM CS)
210181
node->AggregateObject(ndn);

helper/ndn-stack-helper.hpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -85,19 +85,6 @@ class StackHelper : boost::noncopyable {
8585
void
8686
setPolicy(const std::string& policy);
8787

88-
/**
89-
* @brief Set ndnSIM 1.0 content store implementation and its attributes
90-
* @param contentStoreClass string, representing class of the content store
91-
* @note ndnSIM 1.0 content store implementation have limited support for Interest selectors
92-
* Do not use these implementations if your scenario relies on proper selector processing.
93-
*/
94-
void
95-
SetOldContentStore(const std::string& contentStoreClass, const std::string& attr1 = "",
96-
const std::string& value1 = "", const std::string& attr2 = "",
97-
const std::string& value2 = "", const std::string& attr3 = "",
98-
const std::string& value3 = "", const std::string& attr4 = "",
99-
const std::string& value4 = "");
100-
10188
typedef Callback<shared_ptr<Face>, Ptr<Node>, Ptr<L3Protocol>, Ptr<NetDevice>>
10289
FaceCreateCallback;
10390

@@ -266,7 +253,6 @@ class StackHelper : boost::noncopyable {
266253

267254
private:
268255
ObjectFactory m_ndnFactory;
269-
ObjectFactory m_contentStoreFactory;
270256

271257
bool m_needSetDefaultRoutes;
272258
size_t m_maxCsSize;

model/cs/content-store-impl.cpp

Lines changed: 0 additions & 121 deletions
This file was deleted.

0 commit comments

Comments
 (0)