Feature #2314
closedMeasurements::findLongestPrefixMatch(pit::Entry) and MeasurementsAccessor::findLongestPrefixMatch
100%
Description
Implement:
Measurements::findLongestPrefixMatch(const pit::Entry&)
MeasurementsAccessor::findLongestPrefixMatch(const Name&)
MeasurementsAccessor::findLongestPrefixMatch(const pit::Entry&)
so that Strategy can perform longest prefix match lookup on Measurements table efficiently.
Updated by Junxiao Shi almost 10 years ago
- Blocks Feature #1999: Strategy for access router added
Updated by Junxiao Shi almost 10 years ago
- Subject changed from Measurements::findLongestPrefixMatch(pit::Entr) and MeasurementsAccessor::findLongestPrefixMatch to Measurements::findLongestPrefixMatch(pit::Entry) and MeasurementsAccessor::findLongestPrefixMatch
- Estimated time changed from 2.00 h to 1.50 h
One related question: sometimes strategy needs to find a longest prefix match that satisfy certain condition, such as the existence of a certain type of StrategyInfo
.
Which design is better?
- add a
predicate
parameter tofindLongestPrefixMatch
functions - add
findLongestPrefixMatch(const measurements::Entry&)
overload; if the strategy thinks the initial match doesn't satisfy the requirement, it could call this overload to find a longest prefix match of the parent of passed Entry
The first design is cleaner, but it's hard to pass information from the predicate to the caller.
For example, if the predicate calls getStrategyInfo<T>
, the caller (who calls findLongestPrefixMatch
) will have to call getStrategyInfo<T>
again.
Updated by Junxiao Shi almost 10 years ago
20150107 conference call decides to use the first design in note-2. Alex hopes the common expression will be optimized by compiler.
Updated by Junxiao Shi almost 10 years ago
- Status changed from New to In Progress
Updated by Junxiao Shi almost 10 years ago
- % Done changed from 0 to 50
http://gerrit.named-data.net/1600 accepts predicate in Measurements::findLongestPrefixMatch
.
The next commit will expose findLongestPrefixMatch
operation to MeasurementsAccessor
.
Updated by Junxiao Shi almost 10 years ago
- % Done changed from 50 to 70
http://gerrit.named-data.net/1606 adds findLongestPrefixMatch
and findExactMatch
to MeasurementsAccessor
.
However, I realize that I forgot to add Measurements::findLongestPrefixMatch(pit::Entry)
, which shall come before this Change.
Updated by Junxiao Shi almost 10 years ago
- % Done changed from 70 to 90
http://gerrit.named-data.net/1607 adds Measurements::findLongestPrefixMatch(pit::Entry)
.
Updated by Junxiao Shi almost 10 years ago
- Status changed from In Progress to Code review
- % Done changed from 90 to 100
Updated by Junxiao Shi almost 10 years ago
- Status changed from Code review to Closed