Project

General

Profile

Actions

Feature #2272

closed

Strategy API: access to FaceTable

Added by Junxiao Shi almost 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Forwarding
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
2.00 h

Description

Allow strategies to access FaceTable, including:

  • enumerate Faces that satisfy a certain predicate
  • subscribe to onAdd and onRemove events

Related issues 2 (0 open2 closed)

Blocks NFD - Feature #1999: Strategy for access routerClosedJunxiao Shi

Actions
Blocked by ndn-cxx - Feature #2279: Signal: allow only owner to emit eventsClosedJunxiao Shi

Actions
Actions #1

Updated by Junxiao Shi almost 10 years ago

Actions #2

Updated by Junxiao Shi almost 10 years ago

  • Status changed from New to In Progress
Actions #3

Updated by Junxiao Shi almost 10 years ago

  • Status changed from In Progress to Code review
  • % Done changed from 0 to 100
Actions #4

Updated by Alex Afanasyev almost 10 years ago

I don't understand why strategy needs to fire events for "create" and "remove" faces. I can understand that strategy may get notification about those events, but not invoke them. Strategy is not supposed to create faces and even if it creates, there should be separate non-strategy related interface for that.

Actions #5

Updated by Junxiao Shi almost 10 years ago

  • Description updated (diff)

Strategies can subscribe to onAdd and onRemove events, which means they can get notifications.

The semantics of EventEmitter is that only the class in which EventEmitter is declared should trigger the event, and other classes can only subscribe to the event.
This rule is currently a convention; it cannot be enforced in code without changing declaration format.
This problem has nothing to do with #2272.

Actions #6

Updated by Junxiao Shi almost 10 years ago

  • Blocked by Feature #2279: Signal: allow only owner to emit events added
Actions #7

Updated by Junxiao Shi almost 10 years ago

  • Status changed from Code review to In Progress

Newly-introduced ndn::util::signal::Signal provides a way to prevent Strategy from raising FaceTable events.

Thus, I'm injecting a commit to convert FaceTable to use Signal: http://gerrit.named-data.net/1548

Actions #8

Updated by Junxiao Shi almost 10 years ago

  • Status changed from In Progress to Closed
Actions

Also available in: Atom PDF