Task #3590
closedMemoryContentCache: Support setInterestFilter
0%
Description
The Face API has been updated to support setInterestFilter, separate from registerPrefix. MemoryContentCache should support setting an interest filter also. This allows having multiple MemoryContentCache objects to hold Data packets under different namespaces (without needing to register prefix with the forwarder for each namespace.)
Proposal: Add a setInterestFilter method which takes a prefix or interestFilter (like in Face.setInterestFilter) plus the optional onDataNotFound callback (same as MemoryContentCache.registerPrefix). Therefore, the application calls Face.registerPrefix, then supplies the face to the MemoryContentCache constructor, then calls MemoryContentCache.setInterestFilter. It is not necessary to call MemoryContentCache.registerPrefix.
Note: When MemoryContentCache.onInterest doesn't find the data packet, it calls the onDataNotFound callback based on the supplied prefix. It is possible that there are multiple InterestFilters for the same prefix, but for now we don't distinguish these.
Updated by Anonymous over 8 years ago
- Description updated (diff)
I updated the proposal to specify the filter prefix in a separate setInterestFilter method instead of the constructor (since MemoryContentCache already maintains different onDataNotFound callbacks for each prefix).
Updated by Anonymous over 8 years ago
- Status changed from In Progress to Closed
Changes merged to master in all libraries.