zookeeper-cpp
ZooKeeper Client for C++
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Groups
zk::server::server Class Referencefinal

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...
 

Detailed Description

Controls a ZooKeeper server process on this local machine.

Definition at line 29 of file server.hpp.

Constructor & Destructor Documentation

zk::server::server::server ( classpath  packages,
configuration  settings 
)
explicit

Create a running server process with the specified packages and settings.

Parameters
packagesThe classpath to use to find ZooKeeper's QuorumPeerMain class.
settingsThe server settings to run with.
Exceptions
std::invalid_argumentIf 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.

zk::server::server::server ( configuration  settings)
explicit

Create a running server with the specified settings using the system-provided default packages for ZooKeeper (see classpath::system_default).

Parameters
settingsThe server settings to run with.
Exceptions
std::invalid_argumentIf 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.

Member Function Documentation

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.

Parameters
wait_for_stopIf true, wait for the process to run until termination instead of simply initiating the termination.

Definition at line 54 of file server.cpp.


The documentation for this class was generated from the following files: