code: private void changeStateTo(int newState) {
      synchronized (lockObject) {
        int oldState = this.status.getRunState();
        if (oldState == newState) {
          return; //old and new states are same
        }
        this.status.setRunState(newState);
      }
    }
docs: Job state change must happen thru this call