testing: freebsd [travis skip]
[awesomized/libmemcached] / test / lib / Cluster.hpp
index 1cc00ac89539e1931708fc58daf07b343b837459..4e151020c65cdc2a7c6dc747a973dc451de8f80d 100644 (file)
@@ -21,7 +21,7 @@
 class Cluster {
 public:
   explicit Cluster(Server serv, uint16_t cnt = 0);
-
+  explicit Cluster(vector<Server> servers);
   ~Cluster();
 
   Cluster(const Cluster &c) = delete;
@@ -42,14 +42,14 @@ public:
   const vector<Server> &getServers() const;
 
   bool start();
-  void stop();
-  void reset();
+  void stop(bool graceful = false);
   bool isStopped();
   bool isListening();
   void wait();
+  bool restart();
 
 private:
-  uint16_t count;
+  size_t count;
   Server proto;
   vector<Server> cluster;
   map<pid_t, Server *> pids;