core: delete deprecated getGlobalScheduler() API
refs #1290
Change-Id: If994e3bd303f0788d8e945351c182bbd4ab5e0b2
diff --git a/daemon/face/ndnlp-partial-message-store.cpp b/daemon/face/ndnlp-partial-message-store.cpp
index e252c84..9cb9f33 100644
--- a/daemon/face/ndnlp-partial-message-store.cpp
+++ b/daemon/face/ndnlp-partial-message-store.cpp
@@ -61,9 +61,8 @@
return Block(buffer);
}
-PartialMessageStore::PartialMessageStore(Scheduler& scheduler, const time::nanoseconds& idleDuration)
- : m_scheduler(scheduler)
- , m_idleDuration(idleDuration)
+PartialMessageStore::PartialMessageStore(const time::nanoseconds& idleDuration)
+ : m_idleDuration(idleDuration)
{
}
@@ -99,7 +98,7 @@
PartialMessageStore::scheduleCleanup(uint64_t messageIdentifier,
shared_ptr<PartialMessage> partialMessage)
{
- partialMessage->m_expiry = m_scheduler.scheduleEvent(m_idleDuration,
+ partialMessage->m_expiry = scheduler::schedule(m_idleDuration,
bind(&PartialMessageStore::cleanup, this, messageIdentifier));
}
@@ -112,7 +111,7 @@
return;
}
- m_scheduler.cancelEvent(it->second->m_expiry);
+ scheduler::cancel(it->second->m_expiry);
m_partialMessages.erase(it);
}
diff --git a/daemon/face/ndnlp-partial-message-store.hpp b/daemon/face/ndnlp-partial-message-store.hpp
index 7cd3df8..74e3fd9 100644
--- a/daemon/face/ndnlp-partial-message-store.hpp
+++ b/daemon/face/ndnlp-partial-message-store.hpp
@@ -52,8 +52,8 @@
class PartialMessageStore : noncopyable
{
public:
- PartialMessageStore(Scheduler& scheduler,
- const time::nanoseconds& idleDuration = time::milliseconds(100));
+ explicit
+ PartialMessageStore(const time::nanoseconds& idleDuration = time::milliseconds(100));
virtual
~PartialMessageStore();
@@ -79,7 +79,6 @@
private:
std::map<uint64_t, shared_ptr<PartialMessage> > m_partialMessages;
- Scheduler& m_scheduler;
time::nanoseconds m_idleDuration;
};