code: private void removeScheduledJob(UUID jobId, boolean complete) {
      ScheduledJob sched = jobs.remove(jobId);
      if (sched != null) {
        if (complete) {
          sched.monitor.notifyComplete();
          if (logger.isInfoEnabled()) {
            logger.info("Job complete (" + jobId.toString() + ")");
          }
        } else {
          sched.monitor.notifyCancelled();
          if (logger.isInfoEnabled()) {
            logger.info("Job cancelled (" + jobId.toString() + ")");
          }
        }
        jobs.remove(jobId);
        scheduler.removeJob(jobId);
      }
      if (jobs.isEmpty()) {
        synchronized (this.complete) {
          this.complete.notifyAll();
        }
      }
    }
docs: Removes a job.
  @param jobId The <code>UUID</code> identifying the job to be removed.
  @param complete A value indicating whether the job has been completed.