X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=test%2Flib%2FCluster.hpp;h=ab20108c17d447a50532209c53a4b22fa2e75043;hb=92d18858b417309f6bdee6bce464a4f3d6a375fd;hp=c99e1d377ceca6248f68ef72b10d96727f312e23;hpb=21e20f73898b5f47e6cbd866beb95e95d6bf1215;p=awesomized%2Flibmemcached diff --git a/test/lib/Cluster.hpp b/test/lib/Cluster.hpp index c99e1d37..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,9 +41,10 @@ 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(); @@ -53,6 +53,4 @@ private: Server proto; vector cluster; map pids; - - bool startServer(Server &server); };