title: Get individual results from CompletableFuture.allof()
body: <p>I have a class which issues concurrent requests to two dependent services using CompletableFutures. </p>
  
  <p>My code looks like this: </p>
  
  <pre><code>@Builder
  @Slf4j
  public class TestClass {
  
      @NonNull private final ExecutorService threadPool = Executors.newFixedThreadPool(2);
      @NonNull private final dependency1Client;
      @NonNull private final dependency2Client;
  
      public void myMethod() {
  
          RequestObject1 firstDependencyRequest = RequestObject1.builder()
                  .attribute1("someValue")
                  .attribute2("secondValue");
  
          CompletableFuture&lt;ResultStructure1&gt; future1 = CompletableFuture.supplyAsync(() -&gt; dependency1Client.call(firstDependencyRequest), threadPool);
          RequestObject2 secondDependencyRequest = RequestObject2.builder()
                  .attribute1("someValue")
                  .attribute2("secondValue");
  
          CompletableFuture&lt;ResultStructure2&gt; future2 = CompletableFuture.supplyAsync(() -&gt; dependency2Client.call(secondDependencyRequest), threadPool);
  
          try {
              CompletableFuture finalFuture = CompletableFuture.allOf(future1, future2);
  
          } catch (ExecutionException|InterruptedException e) {
              log.error("Exception calling dependency", e);
              throw new RuntimeException(e);
          }
      }
  }
  </code></pre>
  
  <p>I need the results from the two calls to the dependent services. How do I get them without performing a blocking call? I was initially thinking that I'd do future1 .get(), but that's a blocking call and I'll have to wait until I have the results from the first API call. </p>
  
  <p>Is there a way to obtain the results from both the calls?</p>