public synchronized void add(Job job){
  boolean canRunImmediately=dagManager.addJob(job);
  if (canRunImmediately) {
    LOG.debug("Job " + job + " is ready to run.");
    jobsToRun.add(job);
  }
  incrementSubmittedJobCount();
}

public synchronized void add ( Job job ) { boolean canRunImmediately = dagManager . addJob ( job ) ; if ( canRunImmediately ) { LOG . debug ( "Job " + job + " is ready to run." ) ; jobsToRun . add ( job ) ; } incrementSubmittedJobCount ( ) ; }
add the given job to run . it will attempt to acquire the locks needed by the job , but if not possible , it will wait until the jobs that hold the required locks give them up . with this requirement in mind , jobs will be executed in the order that they are added .
