public class BootupProcessExecutor extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
SH |
static long |
WAIT_INTERVAL_SECOND |
| Constructor and Description |
|---|
BootupProcessExecutor() |
| Modifier and Type | Method and Description |
|---|---|
BootupProcessResult |
executeAndWait(List<String> command,
File workingDirectory) |
CompletableFuture<BootupProcessResult> |
executeAsync(List<String> command,
File workingDirectory) |
Optional<String> |
getPidFromFile(Path fileName) |
String |
getPidFromPsOf(String processName) |
boolean |
isProcessRunning(Path pidFile) |
void |
processStatus(Path storagePid,
String name) |
int |
retrievePid(Path pidFile) |
void |
stopProcessIfRunning(Path pidFile,
String programName) |
void |
waitUntilStopped(Path pidFile,
int pid) |
public static final long WAIT_INTERVAL_SECOND
public static final String SH
public CompletableFuture<BootupProcessResult> executeAsync(List<String> command, File workingDirectory)
public BootupProcessResult executeAndWait(List<String> command, File workingDirectory)
public int retrievePid(Path pidFile)
public void waitUntilStopped(Path pidFile, int pid)
public boolean isProcessRunning(Path pidFile)
Copyright © 2018 Grakn Labs Ltd. All rights reserved.