Remove heavy operation in the context of OSGi framework 99/1199/1
authorGiovanni Meo <gmeo@cisco.com>
Mon, 16 Sep 2013 14:32:35 +0000 (16:32 +0200)
committerGiovanni Meo <gmeo@cisco.com>
Mon, 16 Sep 2013 14:32:35 +0000 (16:32 +0200)
commitfd25b9b61833876564827f85373642e1d9bb377c
treedd0986338b25017eb868033b7b9fc004ce969565
parent6c7e9eaeb39a47103deb9a150035a00f29267caf
Remove heavy operation in the context of OSGi framework

The routine modeChangeNotify can be called in the context of the OSGi
framework via the chain:

<snip>
at org.opendaylight.controller.forwardingrulesmanager.internal.ForwardingRulesManager.modeChangeNotify(ForwardingRulesManager.java:2137)
at org.opendaylight.controller.switchmanager.internal.SwitchManager.switchManagerAwareNotify(SwitchManager.java:1797)
at org.opendaylight.controller.switchmanager.internal.SwitchManager.setSwitchManagerAware(SwitchManager.java:1677)
</snip>

now given the modeChangeNotify trigger an interaction with the network
element, it's better to keep that off a different thread to avoid to
stuck the OSGi framework for to long.

Change-Id: I41ba96372816cd0a5b2b488bbfc64d10ba2adb4a
Signed-off-by: Giovanni Meo <gmeo@cisco.com>
opendaylight/forwardingrulesmanager/implementation/src/main/java/org/opendaylight/controller/forwardingrulesmanager/internal/ForwardingRulesManager.java