@Override public void acquireControllerLock() { if (lockStep == null) { try { controller.acquireLock(operationId, true); lockStep = activeStep; } catch (InterruptedException e) { cancelled = true; Thread.currentThread().interrupt(); throw ControllerLogger.ROOT_LOGGER.operationCancelledAsynchronously(); } } }
private void takeWriteLock() { if (lockStep == null) { if (currentStage == Stage.DONE) { throw MESSAGES.invalidModificationAfterCompletedStep(); } try { modelController.acquireLock(respectInterruption); lockStep = activeStep; } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw MESSAGES.operationCancelledAsynchronously(); } } }