public synchronized boolean markTaskCompleted (int taskId) {
        Job job = getJobForTask(taskId);
        if (job == null) {
            LOG.error("Could not find a job containing task {}, and therefore could not mark the task as completed.", taskId);
            return false;
        }
        job.completedTasks.add(taskId);
        return true;
    }
public synchronized boolean markTaskCompleted (int taskId) {
        Job job = getJobForTask(taskId);
        if (job == null) {
            LOG.error("Could not find a job containing task {}, and therefore could not mark the task as completed.", taskId);
            return false;
        }
        job.completedTasks.add(taskId);
        return true;
    }
public synchronized boolean marktaskcompleted (int taskid) { job job = getjobfortask(taskid); if (job == null) { log.error("could not find a job containing task {}, and therefore could not mark the task as completed.", taskid); return false; } job.completedtasks.add(taskid); return true; }