Suppose we have written code to fetch the latest product price from an e-commerce system through a remote API. This task is time-consuming, so we need to run it asynchronously and use Future to get the result of that task. Now, the problem will occur when the remote API service is down. At that time, we need to complete Future manually by the last cached price of the product and that is not possible with Future.
Future only provides a get() method that notifies us when a result is available. We cannot attach a callback function to Future and have it get called automatically when the Future result is available.
Sometimes we have requirements, such as the result of the long-running task is needed to send another long-running task. We can't create such asynchronous workflow with Future.
We cannot run multiple Future in parallel.
The Future API does not have any exception handling.
https://www.linkedin.com/pulse/asynchronous-programming-java-completablefuture-aliaksandr-liakh/