title: Ordered execution of many CompletableFuture.allof() while staying non-blocking
body: <p>I have this case where there is 10 or more tasks that are grouped into many groups. Inside these groups everything should run concurrently, but because each group needs the results of the previous group (with exception of the first group), I need to run them in an orderly fashion (Tasks inside a group don't need to run in order).</p>
  
  <p>The tasks themselves are querying data from database then apply some transformation and save it back to database.</p>
  
  <pre><code>Task 1.1 // This group run first
  Task 1.2
  
  Task 2.1 // Waiting results from group 1
  Task 2.2
  Task 2.3
  
  Task 3.1 // Waiting results from group 2
  </code></pre>
  
  <p>I was thinking to use list of <code>allOf()</code>, iterate it then explicitly call <code>get()</code> for each of that <code>allOf()</code>, but it will block which I don't want it to happen, so my question is, how to execute many <code>allOf()</code> in order? Is iteven possible to use only <code>CompletableFuture</code> here?</p>