Merge "OPNFLWPLUG-929 : Remove deprecated guava library"
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / statistics / StatisticsContextImpl.java
index 89beb9527baca1703fae7b4e19143008c9a82b00..61fd206c2fbe4f0ea7474cadfe3bdb6b10f5aac1 100644 (file)
@@ -221,7 +221,8 @@ class StatisticsContextImpl<T extends OfHeader> implements StatisticsContext {
             // build statistics gathering future
             final ListenableFuture<Boolean> newDataGathering = collectingStatType.stream()
                     .reduce(lastDataGathering, this::statChainFuture,
-                        (listenableFuture, asyn) -> Futures.transformAsync(listenableFuture, result -> asyn));
+                        (listenableFuture, asyn) -> Futures.transformAsync(listenableFuture, result -> asyn,
+                                MoreExecutors.directExecutor()));
 
             // write end timestamp to state snapshot container
             Futures.addCallback(newDataGathering, new FutureCallback<Boolean>() {
@@ -266,7 +267,7 @@ class StatisticsContextImpl<T extends OfHeader> implements StatisticsContext {
                                       getDeviceInfo(), multipartType, deviceContext, deviceContext, convertorExecutor,
                                       statisticsWriterProvider, executorService) : Futures
                     .immediateFuture(Boolean.FALSE);
-        });
+        }, MoreExecutors.directExecutor());
     }
 
     private void startGatheringData() {