/** * Wait until this job has finished. */ public void waitUntilFinished() { waitUntilFinished( -1L ); }
public synchronized void stopJob() { if ( job != null && job.isActive() && job.isInitialized() ) { job.stopAll(); job.waitUntilFinished( 5000 ); // wait until everything is stopped, maximum 5 seconds... log.logMinimal( BaseMessages.getString( PKG, "JobLog.Log.JobWasStopped" ) ); } setControlStates(); }