question: 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 ( ) ; }
target:  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.