Cleanup OvsdbDataTreeChangeListener 41/77841/9
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 15 Nov 2018 07:41:42 +0000 (08:41 +0100)
committerStephen Kitt <skitt@redhat.com>
Mon, 6 May 2019 09:28:12 +0000 (09:28 +0000)
commitc996d32eb986908871e3f44c93067bbd3495a030
treec4a91942e0b545c146e97bf7b005b0c77436c450
parente9b8af368ad119f4f0a708f0a9b40391e3299a49
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