aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-application/src/main/java
diff options
context:
space:
mode:
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>2019-05-02 12:26:06 +0200
committerSonarTech <sonartech@sonarsource.com>2019-06-03 20:21:19 +0200
commit0e90581357a2a9e0a8604246b121a98e4d30d646 (patch)
tree79dcea0792542a4ae9cf892fdade9e352425ce7c /sonar-application/src/main/java
parentd803a7b56badb25efe47ee26e842d7196ba7a419 (diff)
downloadsonarqube-0e90581357a2a9e0a8604246b121a98e4d30d646.tar.gz
sonarqube-0e90581357a2a9e0a8604246b121a98e4d30d646.zip
SONAR-12043 rename current shutdown code from stop to hardStop
Diffstat (limited to 'sonar-application/src/main/java')
-rw-r--r--sonar-application/src/main/java/org/sonar/application/App.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/sonar-application/src/main/java/org/sonar/application/App.java b/sonar-application/src/main/java/org/sonar/application/App.java
index 22231ec1691..dbd4e1311ff 100644
--- a/sonar-application/src/main/java/org/sonar/application/App.java
+++ b/sonar-application/src/main/java/org/sonar/application/App.java
@@ -29,10 +29,10 @@ import org.sonar.application.command.JavaVersion;
import org.sonar.application.config.AppSettings;
import org.sonar.application.config.AppSettingsLoader;
import org.sonar.application.config.AppSettingsLoaderImpl;
+import org.sonar.application.process.HardStopRequestWatcherImpl;
import org.sonar.application.process.ProcessLauncher;
import org.sonar.application.process.ProcessLauncherImpl;
import org.sonar.application.process.StopRequestWatcher;
-import org.sonar.application.process.StopRequestWatcherImpl;
import org.sonar.core.extension.ServiceLoaderWrapper;
import org.sonar.process.System2;
import org.sonar.process.SystemExit;
@@ -44,7 +44,7 @@ public class App {
private final SystemExit systemExit = new SystemExit();
private final JavaVersion javaVersion;
- private StopRequestWatcher stopRequestWatcher;
+ private StopRequestWatcher hardStopRequestWatcher;
public App(JavaVersion javaVersion) {
this.javaVersion = javaVersion;
@@ -74,11 +74,11 @@ public class App {
scheduler.schedule();
- stopRequestWatcher = StopRequestWatcherImpl.create(settings, scheduler::terminate, fileSystem);
- stopRequestWatcher.startWatching();
+ hardStopRequestWatcher = HardStopRequestWatcherImpl.create(settings, scheduler::hardStop, fileSystem);
+ hardStopRequestWatcher.startWatching();
scheduler.awaitTermination();
- stopRequestWatcher.stopWatching();
+ hardStopRequestWatcher.stopWatching();
}
}
@@ -111,12 +111,12 @@ public class App {
public void run() {
systemExit.setInShutdownHook();
- if (stopRequestWatcher != null) {
- stopRequestWatcher.stopWatching();
+ if (hardStopRequestWatcher != null) {
+ hardStopRequestWatcher.stopWatching();
}
// blocks until everything is corrected terminated
- scheduler.terminate();
+ scheduler.hardStop();
}
}
}