private void incrementSubmittedJobCount(){
  countLock.lock();
  try {
    submittedJobCount++;
  }
  finally {
    countLock.unlock();
  }
}

private void incrementSubmittedJobCount ( ) { countLock . lock ( ) ; try { submittedJobCount ++ ; } finally { countLock . unlock ( ) ; } }
this is used with incrementjobdonecount ( ) to know when all the jobs submitted to the executor has finished .
