code: public synchronized void addTask(int taskId) {
      Preconditions.checkArgument(!mTaskIdToInfo.containsKey(taskId), "");
      mTaskIdToInfo.put(taskId, new TaskInfo().setJobId(mId).setTaskId(taskId)
          .setStatus(Status.CREATED).setErrorMessage("").setResult(null));
    }
docs: Registers a task.
  
  @param taskId the task id