diff --git a/daemon/table/measurements.cpp b/daemon/table/measurements.cpp
index 8a24306..f9b9bd3 100644
--- a/daemon/table/measurements.cpp
+++ b/daemon/table/measurements.cpp
@@ -30,20 +30,22 @@
 
 namespace nfd {
 
+using measurements::Entry;
+
 Measurements::Measurements(NameTree& nameTree)
   : m_nameTree(nameTree)
   , m_nItems(0)
 {
 }
 
-shared_ptr<measurements::Entry>
+shared_ptr<Entry>
 Measurements::get(name_tree::Entry& nte)
 {
-  shared_ptr<measurements::Entry> entry = nte.getMeasurementsEntry();
+  shared_ptr<Entry> entry = nte.getMeasurementsEntry();
   if (entry != nullptr)
     return entry;
 
-  entry = make_shared<measurements::Entry>(nte.getPrefix());
+  entry = make_shared<Entry>(nte.getPrefix());
   nte.setMeasurementsEntry(entry);
   ++m_nItems;
 
@@ -54,29 +56,29 @@
   return entry;
 }
 
-shared_ptr<measurements::Entry>
+shared_ptr<Entry>
 Measurements::get(const Name& name)
 {
   shared_ptr<name_tree::Entry> nte = m_nameTree.lookup(name);
   return this->get(*nte);
 }
 
-shared_ptr<measurements::Entry>
+shared_ptr<Entry>
 Measurements::get(const fib::Entry& fibEntry)
 {
   shared_ptr<name_tree::Entry> nte = m_nameTree.get(fibEntry);
   return this->get(*nte);
 }
 
-shared_ptr<measurements::Entry>
+shared_ptr<Entry>
 Measurements::get(const pit::Entry& pitEntry)
 {
   shared_ptr<name_tree::Entry> nte = m_nameTree.get(pitEntry);
   return this->get(*nte);
 }
 
-shared_ptr<measurements::Entry>
-Measurements::getParent(const measurements::Entry& child)
+shared_ptr<Entry>
+Measurements::getParent(const Entry& child)
 {
   if (child.getName().size() == 0) { // the root entry
     return nullptr;
@@ -88,18 +90,22 @@
   return this->get(*nte);
 }
 
-shared_ptr<measurements::Entry>
-Measurements::findLongestPrefixMatch(const Name& name) const
+shared_ptr<Entry>
+Measurements::findLongestPrefixMatch(const Name& name,
+                                     const measurements::EntryPredicate& pred) const
 {
   shared_ptr<name_tree::Entry> nte = m_nameTree.findLongestPrefixMatch(name,
-      [] (const name_tree::Entry& nte) { return nte.getMeasurementsEntry() != nullptr; });
+      [pred] (const name_tree::Entry& nte) -> bool {
+        shared_ptr<Entry> entry = nte.getMeasurementsEntry();
+        return entry != nullptr && pred(*entry);
+      });
   if (nte != nullptr) {
     return nte->getMeasurementsEntry();
   }
   return nullptr;
 }
 
-shared_ptr<measurements::Entry>
+shared_ptr<Entry>
 Measurements::findExactMatch(const Name& name) const
 {
   shared_ptr<name_tree::Entry> nte = m_nameTree.lookup(name);
@@ -109,7 +115,7 @@
 }
 
 void
-Measurements::extendLifetime(measurements::Entry& entry,
+Measurements::extendLifetime(Entry& entry,
                              const time::nanoseconds& lifetime)
 {
   shared_ptr<name_tree::Entry> nte = m_nameTree.get(entry);
@@ -131,7 +137,7 @@
 }
 
 void
-Measurements::cleanup(measurements::Entry& entry)
+Measurements::cleanup(Entry& entry)
 {
   shared_ptr<name_tree::Entry> nte = m_nameTree.get(entry);
   if (nte != nullptr) {
diff --git a/daemon/table/measurements.hpp b/daemon/table/measurements.hpp
index 71d8db5..4d19f34 100644
--- a/daemon/table/measurements.hpp
+++ b/daemon/table/measurements.hpp
@@ -33,15 +33,44 @@
 
 namespace fib {
 class Entry;
-}
+} // namespace fib
 
 namespace pit {
 class Entry;
-}
+} // namespace pit
 
+namespace measurements {
 
-/** \class Measurement
- *  \brief represents the Measurements table
+/** \brief a predicate that accepts or rejects a \p Entry
+ */
+typedef std::function<bool(const Entry&)> EntryPredicate;
+
+/** \brief an \p EntryPredicate that accepts any \p Entry
+ */
+class AnyEntry
+{
+public:
+  bool
+  operator()(const Entry& entry)
+  {
+    return true;
+  }
+};
+
+template<typename T>
+class EntryWithStrategyInfo
+{
+public:
+  bool
+  operator()(const Entry& entry)
+  {
+    return entry.getStrategyInfo<T>() != nullptr;
+  }
+};
+
+} // namespace measurements
+
+/** \brief represents the Measurements table
  */
 class Measurements : noncopyable
 {
@@ -73,7 +102,9 @@
   /** \brief perform a longest prefix match
    */
   shared_ptr<measurements::Entry>
-  findLongestPrefixMatch(const Name& name) const;
+  findLongestPrefixMatch(const Name& name,
+                         const measurements::EntryPredicate& pred =
+                             measurements::AnyEntry()) const;
 
   /** \brief perform an exact match
    */
@@ -103,7 +134,6 @@
 private:
   NameTree& m_nameTree;
   size_t m_nItems;
-  static const time::nanoseconds s_defaultLifetime;
 };
 
 inline time::nanoseconds
