mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-12-14 00:40:55 +08:00
34 lines
807 B
C++
34 lines
807 B
C++
|
#pragma once
|
|||
|
#include "acl_cpp/acl_cpp_define.hpp"
|
|||
|
#include "acl_cpp/connpool/connect_manager.hpp"
|
|||
|
|
|||
|
namespace acl
|
|||
|
{
|
|||
|
|
|||
|
class ACL_CPP_API redis_cluster : public connect_manager
|
|||
|
{
|
|||
|
public:
|
|||
|
/**
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD>캯<EFBFBD><EFBFBD>
|
|||
|
* @param conn_timeout {int} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӳ<EFBFBD>ʱʱ<EFBFBD><EFBFBD>(<EFBFBD><EFBFBD>)
|
|||
|
* @param rw_timeout {int}<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> IO <EFBFBD><EFBFBD>д<EFBFBD><EFBFBD>ʱʱ<EFBFBD><EFBFBD>(<EFBFBD><EFBFBD>)
|
|||
|
*/
|
|||
|
redis_cluster(int conn_timeout, int rw_timeout);
|
|||
|
virtual ~redis_cluster();
|
|||
|
|
|||
|
protected:
|
|||
|
/**
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD>ി<EFBFBD>麯<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӳض<EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* @param addr {const char*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><EFBFBD>ip:port
|
|||
|
* @param count {int} <EFBFBD><EFBFBD><EFBFBD>ӳصĴ<EFBFBD>С<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* @param idx {size_t} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӳض<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><EFBFBD>±<EFBFBD>λ<EFBFBD><EFBFBD>(<EFBFBD><EFBFBD> 0 <EFBFBD><EFBFBD>ʼ)
|
|||
|
*/
|
|||
|
virtual acl::connect_pool* create_pool(const char* addr,
|
|||
|
int count, size_t idx);
|
|||
|
private:
|
|||
|
int conn_timeout_;
|
|||
|
int rw_timeout_;
|
|||
|
};
|
|||
|
|
|||
|
} // namespace acl
|