BUG-3157: perfomance tuning - cache translator lookups 79/20979/3
authorMartin Bobak <mbobak@cisco.com>
Fri, 22 May 2015 09:43:46 +0000 (11:43 +0200)
committermichal rehak <mirehak@cisco.com>
Tue, 2 Jun 2015 11:00:35 +0000 (11:00 +0000)
commita99143f3d14932f56486d020644ba1f7a0eea41c
treeb69d56607f35132f6ef64384a4055687688b2ee0
parentb856e3c6051c1b9a8962fbcac1c3f34b0148f441
BUG-3157: perfomance tuning - cache translator lookups

Once a DeviceContext is instantiated, it has a fixed version, so we can
pre-cache the two most-used translators.

Change-Id: I9d324f14e3003301bf9107e2e6c12a189c0b6c80
Signed-off-by: Robert Varga <rovarga@cisco.com>
Signed-off-by: Martin Bobak <mbobak@cisco.com>
(cherry picked from commit f29048e1e03900f2bce34e0b6dd196488dd34d39)
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/device/DeviceContext.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/device/DeviceContextImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/device/DeviceManagerImpl.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/device/DeviceContextImplTest.java