title: Abort countDownLatch.await() after time out
body: <p>I am using an <code>ExecutorService</code> to implement a 3-thread pool, and CountDownLatch to monitor the completion of all threads, for further processing.</p>
  
  <pre><code>ExecutorService threadExecutor = Executors.newFixedThreadPool(3);
  CountDownLatch countDownLatch = new CountDownLatch(3);
  
  AuthorisationHistoryTask task1 =
      new AuthorisationHistoryTask(commonDataThread, countDownLatch );
  PreAuthHistoryTask task2 = 
      new PreAuthHistoryTask(userID,sessionID, commonDataThread, countDownLatch );
  
  SettlementHistTask task4 = new SettlementHistTask(commonDataThread,countDownLatch);
  
  Future&lt;Map&lt;String, Object&gt;&gt; futureAuthHistory = threadExecutor.submit (task1);
  Future&lt;Map&lt;String, Object&gt;&gt; futurePreAuthHist = threadExecutor.submit (task2);
  Future&lt;Map&lt;String, Object&gt;&gt; futureSettleHist = threadExecutor.submit(task4);
  
  threadExecutor.shutdown();
  
  try {
       countDownLatch.await();
  }catch (InterruptedException e) { 
       logger.logCommon("InterruptedException",CLASS_NAME);                     
  }catch (ExecutionException ex) { 
       logger.logCommon("InterruptedException",CLASS_NAME); 
  }
  </code></pre>
  
  <p>I have used <code>countDownLatch.await()</code> to wait till all the threads are completed. I want this process <code>countDownLatch.await()</code> to abort in case of TIME OUT say 45 secs. How can I implement this?</p>