diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-05-17 14:56:38 +0200 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-05-18 11:33:46 +0200 |
commit | 5451c679ddca7f51755279be38adbff69365a339 (patch) | |
tree | 7e537cd4ee43e1749823a664d72a57387491dab2 /server/sonar-process/src/main/java/org/sonar/process/DefaultProcessCommands.java | |
parent | 6392893e41bc802900c2023c87e64753c00ce887 (diff) | |
download | sonarqube-5451c679ddca7f51755279be38adbff69365a339.tar.gz sonarqube-5451c679ddca7f51755279be38adbff69365a339.zip |
SONAR-7422 add DefaultProcessCommand#reset()
Diffstat (limited to 'server/sonar-process/src/main/java/org/sonar/process/DefaultProcessCommands.java')
-rw-r--r-- | server/sonar-process/src/main/java/org/sonar/process/DefaultProcessCommands.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/server/sonar-process/src/main/java/org/sonar/process/DefaultProcessCommands.java b/server/sonar-process/src/main/java/org/sonar/process/DefaultProcessCommands.java index dade6ab6265..7a4182d6cee 100644 --- a/server/sonar-process/src/main/java/org/sonar/process/DefaultProcessCommands.java +++ b/server/sonar-process/src/main/java/org/sonar/process/DefaultProcessCommands.java @@ -52,6 +52,15 @@ public class DefaultProcessCommands implements ProcessCommands { return new DefaultProcessCommands(directory, processNumber, false); } + /** + * Clears the shared memory space of the specified process number. + */ + public static void reset(File directory, int processNumber) { + try (DefaultProcessCommands processCommands = new DefaultProcessCommands(directory, processNumber, true)) { + // nothing else to do than open file and reset the space of specified process + } + } + @Override public boolean isUp() { return delegate.isUp(); |