private void waitTasksToComplete(){
  log.info("Waiting for {} tasks to finish",futures.size());
  for (  Future f : futures) {
    try {
      f.get();
    }
 catch (    InterruptedException ex) {
      log.warn("The GC was interrupted e=",ex);
    }
catch (    ExecutionException ex) {
      log.error("Exception caught: ",ex);
    }
  }
  futures.clear();
  log.info("GC tasks are done");
}

private void waitTasksToComplete ( ) { log . info ( "Waiting for {} tasks to finish" , futures . size ( ) ) ; for ( Future f : futures ) { try { f . get ( ) ; } catch ( InterruptedException ex ) { log . warn ( "The GC was interrupted e=" , ex ) ; } catch ( ExecutionException ex ) { log . error ( "Exception caught: " , ex ) ; } } futures . clear ( ) ; log . info ( "GC tasks are done" ) ; }
post handling after gc
