Speed up HwvtepTableReader.readAllTables() 07/86107/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 3 Dec 2019 00:09:25 +0000 (01:09 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 3 Dec 2019 00:09:25 +0000 (01:09 +0100)
commit52c0f7c24b792b48955a6978f88ab809ea527a9a
tree8c564274775bfdf29d51eebc8115a2210bb42816
parentb5ef827cc0836e0726bc0188410704cf3a720928
Speed up HwvtepTableReader.readAllTables()

There are two issues here:
- we are using Map.compute() which has needless stores
- we are allocating two capturing lambdas to do that

This refactors the code to use plain imperative style instead
of a stream pipeline. Furthermore it uses a fluent
Map.computeIfAbsent() which results in use of a single
non-capturing lamda.

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