Top "Completable-future" questions

In Java 8, a Future that may be explicitly completed (setting its value and status), and may include dependent functions and actions that trigger upon its completion.

Java 8 CompletableFuture.allOf(...) with Collection or List

Java 8 has a function CompletableFuture.allOf(CompletableFuture<?>...cfs) that returns a CompletableFuture that is completed when all the …

java java-8 completable-future
Throwing exception from CompletableFuture

I have the following code: // How to throw the ServerException? public void myFunc() throws ServerException{ // Some code CompletableFuture<A&…

java exception exception-handling java-8 completable-future
CompletableFuture | thenApply vs thenCompose

I can't get my head around the difference between thenApply() and thenCompose(). So, could someone provide a valid use case? …

java java-8 completable-future
CompletableFuture, supplyAsync() and thenApply()

Need to confirm something. The following code: CompletableFuture .supplyAsync(() -> {return doSomethingAndReturnA();}) .thenApply(a -> convertToB(a)); would …

multithreading java-8 concurrency completable-future futuretask
What is the recommended way to wait till the Completable future threads finish

I am using CompletableFuture as shown below in the code. But concerning the way I should wait till all runnables …

java multithreading concurrency completable-future
Surprising behavior of Java 8 CompletableFuture exceptionally method

I have encountered strange behavior of Java 8 CompletableFuture.exceptionally method. If I execute this code, it works fine and prints …

exception java-8 completable-future
Return CompletableFuture<Void> or CompletableFuture<?>?

I want to write an asynchronous method that returns a CompletableFuture. The only purpose of the future is to track …

java future return-type completable-future
completablefuture join vs get

What is the difference between CompletableFuture.get() and CompletableFuture.join() ? Below is the my code: List<String> process() { …

java java-8 completable-future
List<Future> to Future<List> sequence

I am trying to convert List<CompletableFuture<X>> to CompletableFuture<List<T>>. …

java concurrency java-8 completable-future
Listenablefuture vs Completablefuture

I tried hard but didn't find any article or blog which clearly compares ListenableFuture and CompletableFuture, and provides a good …

java completable-future