synchronized void setJobPriority ( JobID jobId , JobPriority priority ) { JobInProgress job = jobs . get ( jobId ) ; if ( job != null ) { synchronized ( taskScheduler ) { JobStatus oldStatus = ( JobStatus ) job . getStatus ( ) . clone ( ) ; job . setPriority ( priority ) ; JobStatus newStatus = ( JobStatus ) job . getStatus ( ) . clone ( ) ; JobStatusChangeEvent event = new JobStatusChangeEvent ( job , EventType . PRIORITY_CHANGED , oldStatus , newStatus ) ; updateJobInProgressListeners ( event ) ; } } else { LOG . warn ( "Trying to change the priority of an unknown job: " + jobId ) ; } }
Change the run - time priority of the given job .