X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=test%2Flib%2FCluster.hpp;h=ab20108c17d447a50532209c53a4b22fa2e75043;hb=11ad51482c0481d8ef8fc2b8efa8293ffd48d95d;hp=1cc00ac89539e1931708fc58daf07b343b837459;hpb=a1b265e9eba018e9ea510c9224953c27fc271bc9;p=awesomized%2Flibmemcached diff --git a/test/lib/Cluster.hpp b/test/lib/Cluster.hpp index 1cc00ac8..ab20108c 100644 --- a/test/lib/Cluster.hpp +++ b/test/lib/Cluster.hpp @@ -20,8 +20,7 @@ class Cluster { public: - explicit Cluster(Server serv, uint16_t cnt = 0); - + explicit Cluster(Server serv, size_t cnt = 3); ~Cluster(); Cluster(const Cluster &c) = delete; @@ -42,17 +41,16 @@ public: const vector &getServers() const; bool start(); - void stop(); - void reset(); + void stop(bool graceful = false); bool isStopped(); - bool isListening(); + bool isListening() const; + bool ensureListening(); void wait(); + bool restart(); private: - uint16_t count; + size_t count; Server proto; vector cluster; map pids; - - bool startServer(Server &server); };