[OVSDB-33] OVSDB needs to iterate over all of the OVSBDInventoryListeners Created: 03/Jul/14  Updated: 03/May/18  Resolved: 05/Aug/14

Status: Resolved
Project: ovsdb
Component/s: API
Affects Version/s: unspecified
Fix Version/s: None

Type: Improvement
Reporter: Vishal Patil Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Mac OS
Platform: PC



 Description   

OVSDB seems to inform about inventory changes to just one listener. For example,
when a row is removed from a table

OVSDBInventoryListener inventoryListener = (OVSDBInventoryListener)ServiceHelper.getGlobalInstance(OVSDBInventoryListener.class, this);
inventoryListener.rowRemoved(...)

Instead it would be more useful if OVSDB informed all of the listeners about
the inventory changes. For example, the above code could be enhanced to

Object[] listeners = ServiceHelper.getGlobalInstances(OVSDBInventoryListener.class, this, null);
OVSDBInventoryListener inventoryListeners[] = Arrays.copyOf(listeners, listeners.length, OVSDBInventoryListener[].class);
for (OVSDBInventoryListener inventoryListener: inventoryListeners)

{ inventoryListener.rowRemoved(...); }

 Comments   
Comment by Dave Tucker [ 05/Aug/14 ]

https://git.opendaylight.org/gerrit/#/c/9246/

Generated at Wed Feb 07 20:35:20 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.