ListenableFuture<List<Map<String, Object>>> listListenableFuture = Futures.successfulAsList(futures);
Futures.addCallback(listListenableFuture, new FutureCallback<List<Map<String, Object>>>() {
@Override
public void onSuccess(List<Map<String, Object>> result) {
task.finished();
executorService.shutdown();
fileWritingService.shutdown();
}
@Override