private function startDynamoJar() { $javaCmd = "java -Djava.library.path={$this->libPath} " . "-jar {$this->jarPath} -sharedDb -inMemory -port {$this->port}"; $this->process = new BackgroundProcess($javaCmd); $this->process->run(); if (!$this->process->isRunning()) { throw new \RuntimeException("Unable to start local dynamodb"); } }
public function stop() { if ($this->process && $this->process->isRunning()) { $this->process->stop(); } }