code: public final void registerStatus(TaskStatus status) {
  	TaskStatus.validate(this.status, status);
  	this.status = status;
  	if (status.equals(TaskStatus.SUBMITTED)) {
  	  clear();
  	}
    }
docs: Registers a new status. DO NOT USE THIS METHOD UNLESS YOU ARE DEVELOPING A
  NEW TASK EXECUTOR.
  
  @param status
  the new status