2 #include "../acl_cpp_define.hpp" 5 #include "../stdlib/string.hpp" 6 #include "../connpool/connect_manager.hpp" 8 #if !defined(ACL_CLIENT_ONLY) && !defined(ACL_REDIS_DISABLE) 15 class redis_client_pool;
56 void set_slot(
int slot,
const char* addr);
71 void set_all_slot(
const char* addr,
size_t max_conns,
72 int conn_timeout = 30,
int rw_timeout = 30);
82 void clear_slot(
int slot);
101 void set_redirect_max(
int max);
110 return redirect_max_;
126 void set_redirect_sleep(
int n);
136 return redirect_sleep_;
179 const char* get_password(
const char* addr)
const;
187 redis_client* redirect(
const char* addr,
size_t max_conns);
209 connect_pool* create_pool(
const char* addr,
size_t count,
size_t idx);
213 const char** slot_addrs_;
214 std::vector<char*> addrs_;
217 std::map<string, string> passwds_;
222 const char* ptr,
int nretried);
224 const char* ptr,
int nretried);
226 const char* ptr,
int nretried);
230 int* timeout = NULL);
235 #endif // !defined(ACL_CLIENT_ONLY) && !defined(ACL_REDIS_DISABLE) int get_redirect_sleep() const
int get_redirect_max() const
const std::map< string, string > & get_passwords(void) const