public ListenableFuture executeAllAsync()

in bulkimport/src/main/java/com/microsoft/azure/documentdb/bulkimport/CongestionController.java [249:268]


    public ListenableFuture<Void> executeAllAsync()  {

        Callable<ListenableFuture<Void>> c = new Callable<ListenableFuture<Void>>() {

            @Override
            public ListenableFuture<Void> call() throws Exception {
                return executeAll();
            }
        };

        ListenableFuture<ListenableFuture<Void>> f = executor.submit(c);
        AsyncFunction<ListenableFuture<Void>, Void> function = new AsyncFunction<ListenableFuture<Void>, Void>() {

            @Override
            public ListenableFuture<Void> apply(ListenableFuture<Void> input) throws Exception {
                return input;
            }
        };
        return Futures.transformAsync(f, function, executor);
    }