1 #include "detail/subprocess.hpp" 2 #include "package_registry.hpp" 14 _worker([this, classpath =
std::move(classpath)] () mutable { this->run_process(std::move(classpath)); })
17 server::~server() noexcept
28 void server::shutdown(
bool wait_for_stop)
35 void server::run_process(std::string classpath)
37 detail::subprocess proc(
"java",
39 "-cp", std::move(classpath),
40 "org.apache.zookeeper.server.quorum.QuorumPeerMain",
48 std::cout << proc.stdout().read();
49 std::cerr << proc.stderr().read();
optional< std::string > find_newest_classpath() const
Get the classpath for running the newest registered server version.
Controls a ZooKeeper server process on this local machine.
static std::shared_ptr< server > create(package_registry ®istry)
Create a running server process with the best (newest) version from the provided registry.
The package registry tracks configuration of classpaths and JARs needed to run various ZooKeeper vers...