Cleanup OvsdbDataTreeChangeListener 15/81915/2
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 15 Nov 2018 07:41:42 +0000 (08:41 +0100)
committerAnil Vishnoi <vishnoianil@gmail.com>
Thu, 1 Aug 2019 22:07:00 +0000 (22:07 +0000)
commite619d10a77bf9df2bf0c4c8a109d5b54f2af2df9
tree724b285c66847752972d257a0c0841ea4bd3b915
parent204a4da45e0d4576fe8ecd89d34a838861e8667a
Cleanup OvsdbDataTreeChangeListener

This patch restructures the logic a bit, so that it does not invoke
getData{After,Before}() multiple times, fixing Eclipse warnings and
improving performance.

Furthermore augmentation handling is refactored so that the two
cases (node/bridge) are handled in an if cascade, preserving type
safety.

Finally updateConnections() is refactored to use a switch statement
instead of multiple if conditions, which shows that delete of the
entire node are not handled -- a FIXME is placed there.

Change-Id: If5663ebd2944d7fe83c4928b96cedc0db0f90e19
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbDataTreeChangeListener.java