#include "common.hpp"
#include "Cluster.hpp"
+#include "ReturnMatcher.hpp"
+
class MemcachedCluster {
public:
Cluster cluster;
- memcached_st memc;
+ memcached_st memc{empty_memc};
+ ReturnMatcher returns{&memc};
MemcachedCluster();
explicit
MemcachedCluster(Cluster &&cluster);
~MemcachedCluster();
- void enableBinary(bool enable = true);
+ MemcachedCluster(const MemcachedCluster &) = delete;
+ MemcachedCluster &operator=(const MemcachedCluster &) = delete;
+
+ MemcachedCluster(MemcachedCluster &&mc);;
+ MemcachedCluster &operator=(MemcachedCluster &&mc);
+
+ void enableBinaryProto(bool enable = true);
+ void enableBuffering(bool enable = true);
+ void enableReplication();
void flush();
static MemcachedCluster mixed();
- static MemcachedCluster net();
+ static MemcachedCluster network();
static MemcachedCluster socket();
private:
+ static const memcached_st empty_memc;
+
void init();
};