2 #include "../acl_cpp_define.hpp" 6 #include "../stdlib/string.hpp" 9 #if !defined(ACL_CLIENT_ONLY) && !defined(ACL_REDIS_DISABLE) 57 bool cluster_addslots(
int first, ...);
58 bool cluster_addslots(
const int slot_list[],
size_t n);
59 bool cluster_addslots(
const std::vector<int>& slot_list);
75 bool cluster_delslots(
int first, ...);
76 bool cluster_delslots(
const int slot_list[],
size_t n);
77 bool cluster_delslots(
const std::vector<int>& slot_list);
91 int cluster_getkeysinslot(
size_t slot,
size_t max, std::list<string>& result);
104 bool cluster_meet(
const char* ip,
int port);
115 bool cluster_reset();
116 bool cluster_reset_hard();
117 bool cluster_reset_soft();
130 bool cluster_setslot_importing(
size_t slot,
const char* src_node);
143 bool cluster_setslot_migrating(
size_t slot,
const char* dst_node);
153 bool cluster_setslot_stable(
size_t slot);
166 bool cluster_setslot_node(
size_t slot,
const char* node);
176 int cluster_count_failure_reports(
const char* node);
186 bool cluster_failover();
196 bool cluster_failover_force();
206 bool cluster_failover_takeover();
216 bool cluster_info(std::map<string, string>& result);
224 bool cluster_saveconfig();
234 int cluster_countkeysinslot(
size_t slot);
244 bool cluster_forget(
const char* node);
254 int cluster_keyslot(
const char* key);
264 bool cluster_replicate(
const char* node);
266 bool cluster_set_config_epoch(
const char* epoch);
277 const std::vector<redis_slot*>* cluster_slots();
288 const std::map<string, redis_node*>* cluster_nodes();
298 const std::vector<redis_node*>* cluster_slaves(
const char* node);
301 std::vector<redis_slot*> slots_;
305 size_t slot_max,
size_t slot_min);
309 std::map<string, redis_node*> masters_;
312 void add_slot_range(
redis_node* node,
char* slots);
314 redis_node* get_slave(
const std::vector<string>& tokens);
317 std::vector<redis_node*> slaves_;
323 #endif // !defined(ACL_CLIENT_ONLY) && !defined(ACL_REDIS_DISABLE)
#define ACL_CPP_DEPRECATED