zookeeper-cpp
ZooKeeper Client for C++
|
The package registry tracks configuration of classpaths and JARs needed to run various ZooKeeper versions. More...
#include <zk/server/package_registry.hpp>
Classes | |
struct | registration_info |
Public Types | |
using | size_type = std::size_t |
using | registration = std::shared_ptr< registration_info > |
Public Member Functions | |
package_registry () | |
Create an empty registry. More... | |
registration | register_classpath_server (std::string version, classpath packages) |
Register a server that can be created via the specified Java classpath. More... | |
size_type | size () const |
How many registrations have been registered? More... | |
bool | empty () const |
Is this registry empty? More... | |
optional< classpath > | find_newest_classpath () const |
Get the classpath for running the newest registered server version. More... | |
bool | unregister_server (registration reg) |
bool | unregister_server (const registration_info ®) |
The package registry tracks configuration of classpaths and JARs needed to run various ZooKeeper versions.
package_registry
is being destroyed. Definition at line 25 of file package_registry.hpp.
zk::server::package_registry::package_registry | ( | ) |
Create an empty registry.
Definition at line 25 of file package_registry.cpp.
|
inline |
Is this registry empty?
Definition at line 62 of file package_registry.hpp.
optional< classpath > zk::server::package_registry::find_newest_classpath | ( | ) | const |
Get the classpath for running the newest registered server version.
Definition at line 66 of file package_registry.cpp.
package_registry::registration zk::server::package_registry::register_classpath_server | ( | std::string | version, |
classpath | packages | ||
) |
Register a server that can be created via the specified Java classpath.
version | A version string used to look up the server when creating them. While this can be a lie, it should not be. |
packages | The Java classpath used to run the server. This will be the cp argument to Java. |
std::invalid_argument | if version is already registered. |
Definition at line 35 of file package_registry.cpp.
package_registry::size_type zk::server::package_registry::size | ( | ) | const |
How many registrations have been registered?
Definition at line 60 of file package_registry.cpp.
bool zk::server::package_registry::unregister_server | ( | registration | reg | ) |
Attempt to unregister the server associated with the provided registration. Unregistering will prevent future servers from being created with the particular setup, but will not teardown servers which might be running with it.
true
if this call removed anything; false
if otherwise. Definition at line 52 of file package_registry.cpp.