diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-01-07 18:20:00 +0100 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-01-13 13:42:43 +0100 |
commit | 1d49769ae87ac8a2a553815bf2bfc9bf17a85f8f (patch) | |
tree | 41a20b8882d1b69f0b48ae7adea9b0b4ab877558 /sonar-application/src | |
parent | 10ddbf28d97a7b1626706efdf2cb88893b34ed4a (diff) | |
download | sonarqube-1d49769ae87ac8a2a553815bf2bfc9bf17a85f8f.tar.gz sonarqube-1d49769ae87ac8a2a553815bf2bfc9bf17a85f8f.zip |
SONAR-7168 rework threads and restart implementation
Diffstat (limited to 'sonar-application/src')
-rw-r--r-- | sonar-application/src/main/java/org/sonar/application/App.java | 6 |
1 files changed, 4 insertions, 2 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 3699304b84f..db78e1bf0c8 100644 --- a/sonar-application/src/main/java/org/sonar/application/App.java +++ b/sonar-application/src/main/java/org/sonar/application/App.java @@ -41,6 +41,8 @@ import java.util.Properties; */ public class App implements Stoppable { + private static final int APP_PROCESS_NUMBER = 0; + private final Monitor monitor; private StopWatcher stopWatcher = null; @@ -55,7 +57,7 @@ public class App implements Stoppable { public void start(Props props) { if (props.valueAsBoolean(ProcessProperties.ENABLE_STOP_COMMAND, false)) { File tempDir = props.nonNullValueAsFile(ProcessProperties.PATH_TEMP); - ProcessCommands commands = new DefaultProcessCommands(tempDir, 0); + ProcessCommands commands = new DefaultProcessCommands(tempDir, APP_PROCESS_NUMBER); stopWatcher = new StopWatcher(commands, this); stopWatcher.start(); } @@ -63,7 +65,7 @@ public class App implements Stoppable { monitor.awaitTermination(); } - List<JavaCommand> createCommands(Props props) { + private List<JavaCommand> createCommands(Props props) { List<JavaCommand> commands = new ArrayList<>(); File homeDir = props.nonNullValueAsFile(ProcessProperties.PATH_HOME); File tempDir = props.nonNullValueAsFile(ProcessProperties.PATH_TEMP); |