private boolean tryChangeToTerminalState(DeploymentStatus terminalState, boolean forgetRuntime) {
        //assumed myLock
        DeploymentRuntime targetRuntime = forgetRuntime ? null : myDeployment.getRuntime();
        return myDeployment.changeState(DeploymentStatus.DEPLOYING, terminalState, null, targetRuntime);
      }
private boolean tryChangeToTerminalState(DeploymentStatus terminalState, boolean forgetRuntime)