// 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>() {
getDeviceInfo(), multipartType, deviceContext, deviceContext, convertorExecutor,
statisticsWriterProvider, executorService) : Futures
.immediateFuture(Boolean.FALSE);
- });
+ }, MoreExecutors.directExecutor());
}
private void startGatheringData() {