X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=test%2Flib%2FCluster.hpp;h=ab20108c17d447a50532209c53a4b22fa2e75043;hb=24f797294aca130e70317003f4ee42540429ec63;hp=199d2c74c49c51afbd4176b664387f375d095034;hpb=2c43b7ea471c819c8e726eefccc39a469f6b9ae6;p=awesomized%2Flibmemcached diff --git a/test/lib/Cluster.hpp b/test/lib/Cluster.hpp index 199d2c74..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(vector servers); + explicit Cluster(Server serv, size_t cnt = 3); ~Cluster(); Cluster(const Cluster &c) = delete; @@ -42,16 +41,16 @@ public: const vector &getServers() const; bool start(); - void stop(); + void stop(bool graceful = false); bool isStopped(); - bool isListening(); + bool isListening() const; + bool ensureListening(); void wait(); + bool restart(); private: size_t count; Server proto; vector cluster; map pids; - - bool startServer(Server &server); };