|
Openflow Plugin uses threads of other components to do potential
blocking operations such as publish notification (blocking queue), wait for respond from OpenflowJava, etc.
This behaviour could be spotted by using Futures.immediateFuture in code,
where API contract requires future to be returned.
Affected code is:
./openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/ConnectionConductorImpl.java
./openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/ModelDrivenSwitchImpl.java
./openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/session/MessageDispatchServiceImpl.java
In order to behave correctly, it will be better to use JdkFutureAdapters to convert incomming futures to ListenableFuture (if Future is already listenable, it does simple cast) and then uses Futures.transform(ListenableFuture,Function) or Futures.transform(ListenableFuture,AsyncFunction) to transform result.
|