use of org.eclipse.che.api.workspace.server.spi.RuntimeStartInterruptedException in project devspaces-images by redhat-developer.
the class StartSynchronizer method interrupt.
/**
* Interrupts workspace start if it is in progress and is not interrupted yet
*
* @return true if workspace start is interrupted, false otherwise
*/
public synchronized boolean interrupt() {
if (!isStarting) {
return false;
}
startFailure.completeExceptionally(new RuntimeStartInterruptedException(runtimeId));
if (startThread != null) {
startThread.interrupt();
// set to not to interrupt twice
startThread = null;
}
return true;
}
Aggregations