zookeeper-cpp
ZooKeeper Client for C++
|
Controls a ZooKeeper server process on this local machine. More...
#include <zk/server/server.hpp>
Public Member Functions | |
server (classpath packages, configuration settings) | |
Create a running server process with the specified packages and settings. More... | |
server (configuration settings) | |
Create a running server with the specified settings using the system-provided default packages for ZooKeeper (see classpath::system_default). More... | |
server (const server &)=delete | |
void | shutdown (bool wait_for_stop=false) |
Initiate shutting down the server process. More... | |
Controls a ZooKeeper server process on this local machine.
Definition at line 29 of file server.hpp.
|
explicit |
Create a running server process with the specified packages and settings.
packages | The classpath to use to find ZooKeeper's QuorumPeerMain class. |
settings | The server settings to run with. |
std::invalid_argument | If settings.is_minimal() is false and settings.source_file() is nullopt . This is because non-minimal configurations require ZooKeeper to be launched with a file. |
Definition at line 33 of file server.cpp.
|
explicit |
Create a running server with the specified settings using the system-provided default packages for ZooKeeper (see classpath::system_default).
settings | The server settings to run with. |
std::invalid_argument | If settings.is_minimal() is false and settings.source_file() is nullopt . This is because non-minimal configurations require ZooKeeper to be launched with a file. |
Definition at line 45 of file server.cpp.
void zk::server::server::shutdown | ( | bool | wait_for_stop = false | ) |
Initiate shutting down the server process.
For most usage, this is not needed, as it is called automatically from the destructor.
wait_for_stop | If true , wait for the process to run until termination instead of simply initiating the termination. |
Definition at line 54 of file server.cpp.