Optimize AbstractBestPathSelector 17/78517/3
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 5 Dec 2018 17:15:52 +0000 (18:15 +0100)
committerRobert Varga <nite@hq.sk>
Fri, 7 Dec 2018 10:03:25 +0000 (10:03 +0000)
commit90ff8238cb38122202f3928d8e8c9c6cb26805d3
treee5a839ccd7d7dd9b7b9a7d5247faf76cbea78af2
parent28fa5d1095933a7b5763bd23142963072d1d5cce
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