2 #include "../acl_cpp_define.hpp" 3 #include "../stdlib/thread.hpp" 4 #include "../stdlib/string.hpp" 5 #include "../stdlib/tbox.hpp" 6 #include "../stdlib/mbox.hpp" 9 #if !defined(ACL_CLIENT_ONLY) && !defined(ACL_REDIS_DISABLE) 85 void set_request(
size_t argc,
const char** argv,
size_t* lens) {
109 mbox_->push(
this,
false);
111 tbox_->push(
this,
false);
129 return redirect_count_;
142 size_t redirect_count_;
155 const char* addr,
int conn_timeout,
int rw_timeout,
bool retry);
164 return addr_.
c_str();
176 BOX<redis_pipeline_message> box_;
177 std::vector<redis_pipeline_message*> msgs_;
182 bool handle_messages(
void);
183 bool flush_all(
void);
184 bool wait_results(
void);
186 void all_failed(
void);
202 void start_thread(
void);
205 void stop_thread(
void);
251 BOX<redis_pipeline_message> box_;
253 std::vector<char*> addrs_;
254 const char** slot_addrs_;
257 void set_slot(
int slot,
const char* addr);
260 void set_all_slot(
void);
263 void start_channels(
void);
266 void stop_channels(
void);
272 void stop_channel(
const char* addr);
307 #endif // !defined(ACL_CLIENT_ONLY) && !defined(ACL_REDIS_DISABLE) size_t get_nchild(void) const
const redis_result * wait(void)
redis_pipeline_message(redis_command *cmd, redis_pipeline_type_t type, bool use_mbox=true)
void set_option(size_t nchild, int *timeout)
~redis_pipeline_message(void)
redis_pipeline_channel(redis_client_pipeline &pipeline, const char *addr, int conn_timeout, int rw_timeout, bool retry)
void set_addr(const char *addr)
redis_pipeline_message & set_type(redis_pipeline_type_t type)
redis_command * get_cmd(void)
int * get_timeout(void) const
void push(const redis_result *result)
const char * get_addr(void) const
int get_max_slot(void) const
redis_pipeline_type_t get_type(void) const
size_t get_redirect_count(void) const
void push(redis_pipeline_message *msg)
~redis_pipeline_channel(void)
redis_pipeline_channel & set_passwd(const char *passwd)
void set_request(size_t argc, const char **argv, size_t *lens)
const char * get_addr(void) const