code: public synchronized boolean awaitJobTermination(long timeoutInSeconds) throws InterruptedException {
  		if (future != null && !future.isDone()) {
  			logger.info("Blocking until active job completed (timeout: " + timeoutInSeconds + " secs).");
  			return executor.awaitTermination(timeoutInSeconds, TimeUnit.SECONDS);
  		}
      	return true;
      }
docs: Blocks until the active asynchronous operation (-"long job") completed
  execution or the timeout occurs.
  
  @param timeoutInSeconds the maximum time to wait, in seconds
  @param unit the time unit of the timeout argument
  @return <tt>true</tt> if job terminated and <tt>false</tt>
  if the timeout elapsed before termination
  @throws InterruptedException if interrupted while waiting.