Optimize AbstractBestPathSelector 70/78470/4
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 5 Dec 2018 17:15:52 +0000 (18:15 +0100)
committerRobert Varga <nite@hq.sk>
Thu, 6 Dec 2018 03:32:49 +0000 (03:32 +0000)
commit2cb281a0d977fea786717faa7bf2ae1c45a073a2
tree4687bc09f24e7619de696ee8eb3d7ab7356ef614
parent30ed05f6e3062f5f45e3467be4ea27f042c0059c
Optimize AbstractBestPathSelector

There are inefficiencies in how we compare local preference, let's
refactor the code to have clear comparisons without unnecessary
boxing.

Also remove implicit boxing of AS numbers, as we are already getting
them as primitive longs.

Change-Id: I3cbba14fa2c2bd2add35c0f827da8ba4a06a0b4b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
bgp/path-selection-mode/src/main/java/org/opendaylight/protocol/bgp/mode/api/BestPathState.java
bgp/path-selection-mode/src/main/java/org/opendaylight/protocol/bgp/mode/impl/BestPathStateImpl.java
bgp/path-selection-mode/src/main/java/org/opendaylight/protocol/bgp/mode/spi/AbstractBestPathSelector.java