projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
prepare v1.1.4
[awesomized/libmemcached]
/
test
/
lib
/
Cluster.hpp
diff --git
a/test/lib/Cluster.hpp
b/test/lib/Cluster.hpp
index 199d2c74c49c51afbd4176b664387f375d095034..ab20108c17d447a50532209c53a4b22fa2e75043 100644
(file)
--- a/
test/lib/Cluster.hpp
+++ b/
test/lib/Cluster.hpp
@@
-20,8
+20,7
@@
class Cluster {
public:
class Cluster {
public:
- explicit Cluster(Server serv, uint16_t cnt = 0);
- explicit Cluster(vector<Server> servers);
+ explicit Cluster(Server serv, size_t cnt = 3);
~Cluster();
Cluster(const Cluster &c) = delete;
~Cluster();
Cluster(const Cluster &c) = delete;
@@
-42,16
+41,16
@@
public:
const vector<Server> &getServers() const;
bool start();
const vector<Server> &getServers() const;
bool start();
- void stop();
+ void stop(
bool graceful = false
);
bool isStopped();
bool isStopped();
- bool isListening();
+ bool isListening() const;
+ bool ensureListening();
void wait();
void wait();
+ bool restart();
private:
size_t count;
Server proto;
vector<Server> cluster;
map<pid_t, Server *> pids;
private:
size_t count;
Server proto;
vector<Server> cluster;
map<pid_t, Server *> pids;
-
- bool startServer(Server &server);
};
};