@Override protected void onBeforeProcess(IRuntimeConfig runtimeConfig) throws IOException { super.onBeforeProcess(runtimeConfig); MemcachedConfig config = getConfig(); }
@Override protected void onBeforeProcessStart(ProcessBuilder processBuilder, NodejsConfig config, IRuntimeConfig runtimeConfig) { super.onBeforeProcessStart(processBuilder, config, runtimeConfig); processBuilder.directory(new File(config.getWorkingDirectory())); }
@Override public synchronized final void stop() { if (!stopped) { stopped = true; stopInternal(); onAfterProcessStop(this.config, this.runtimeConfig); cleanupInternal(); if (!Files.forceDelete(pidFile)) { logger.warn("Could not delete pid file: {}", pidFile); } } }
this.distribution = distribution; this.pidFile = pidFile(this.executable.getFile().executable()); onBeforeProcess(runtimeConfig); getCommandLine(distribution, config, this.executable.getFile())), getEnvironment(distribution, config, this.executable.getFile()), true); onBeforeProcessStart(processBuilder, config, runtimeConfig); writePidFile(pidFile, process.getPid()); onAfterProcessStart(process, runtimeConfig); stop(); throw iox;
public boolean isProcessRunning() { if (getProcessId() > 0) { return Processes.isProcessRunning(distribution.getPlatform(), getProcessId()); } return false; }
protected File pidFile(File executableFile) { return new File(executableFile.getParentFile(),executableBaseName(executableFile.getName())+".pid"); }
this.distribution = distribution; this.pidFile = pidFile(this.executable.getFile().executable()); onBeforeProcess(runtimeConfig); getCommandLine(distribution, config, this.executable.getFile())), getEnvironment(distribution, config, this.executable.getFile()), true); onBeforeProcessStart(processBuilder, config, runtimeConfig); writePidFile(pidFile, process.getPid()); onAfterProcessStart(process, runtimeConfig); stop(); throw iox;
public boolean isProcessRunning() { return getProcessId() > 0 && Processes.isProcessRunning(distribution.platform(), getProcessId()); }
protected File pidFile(File executeableFile) { return new File(executeableFile.getParentFile(),executableBaseName(executeableFile.getName())+".pid"); }
@Override public synchronized final void stop() { if (!stopped) { stopped = true; stopInternal(); onAfterProcessStop(this.config, this.runtimeConfig); cleanupInternal(); if (!Files.forceDelete(pidFile)) { logger.warn("Could not delete pid file: {}", pidFile); } } }
protected boolean tryKillToProcess() { return getProcessId() > 0 && Processes.tryKillProcess(config.supportConfig(), distribution.platform(), StreamToLineProcessor.wrap(runtimeConfig.getProcessOutput().getCommands()), getProcessId()); }
protected boolean sendKillToProcess() { return getProcessId() > 0 && Processes.killProcess(config.supportConfig(), distribution.platform(), StreamToLineProcessor.wrap(runtimeConfig.getProcessOutput().getCommands()), getProcessId()); }
protected boolean sendTermToProcess() { return getProcessId() > 0 && Processes.termProcess(config.supportConfig(), distribution.platform(), StreamToLineProcessor.wrap(runtimeConfig.getProcessOutput().getCommands()), getProcessId()); }