acl  3.5.3.0
acl::redis_hyperloglog类 参考

#include <redis_hyperloglog.hpp>

+ 类 acl::redis_hyperloglog 继承关系图:
+ acl::redis_hyperloglog 的协作图:

Public 成员函数

 redis_hyperloglog (void)
 
 redis_hyperloglog (redis_client *conn)
 
 redis_hyperloglog (redis_client_cluster *cluster)
 
ACL_CPP_DEPRECATED redis_hyperloglog (redis_client_cluster *cluster, size_t max_conns)
 
 redis_hyperloglog (redis_client_pipeline *pipeline)
 
virtual ~redis_hyperloglog (void)
 
int pfadd (const char *key, const char *first_element,...)
 
int pfadd (const char *key, const std::vector< const char * > &elements)
 
int pfadd (const char *key, const std::vector< string > &elements)
 
int pfcount (const char *first_key,...)
 
int pfcount (const std::vector< const char * > &keys)
 
int pfcount (const std::vector< string > &keys)
 
bool pfmerge (const char *dst, const char *first_src,...)
 
bool pfmerge (const char *dst, const std::vector< const char * > &keys)
 
bool pfmerge (const char *dst, const std::vector< string > &keys)
 
- Public 成员函数 继承自 acl::redis_command
 redis_command (void)
 
 redis_command (redis_client *conn)
 
 redis_command (redis_client_cluster *cluster)
 
ACL_CPP_DEPRECATED redis_command (redis_client_cluster *cluster, size_t max_conns)
 
 redis_command (redis_client_pipeline *pipeline)
 
virtual ~redis_command (void)
 
void set_check_addr (bool on)
 
void clear (bool save_slot=false)
 
void reset (bool save_slot=false)
 
void set_client (redis_client *conn)
 
redis_clientget_client (void) const
 
const char * get_client_addr (void) const
 
void set_cluster (redis_client_cluster *cluster)
 
ACL_CPP_DEPRECATED void set_cluster (redis_client_cluster *cluster, size_t max_conns)
 
redis_client_clusterget_cluster (void) const
 
void set_pipeline (redis_client_pipeline *pipeline, bool use_mbox=true)
 
redis_client_pipelineget_pipeline (void) const
 
dbuf_poolget_dbuf (void) const
 
redis_result_t result_type (void) const
 
const char * result_status (void) const
 
const char * result_error (void) const
 
size_t result_size (void) const
 
int result_number (bool *success=NULL) const
 
long long int result_number64 (bool *success=NULL) const
 
const char * get_result (size_t i, size_t *len=NULL) const
 
bool eof (void) const
 
const redis_resultget_result (void) const
 
const redis_resultresult_child (size_t i) const
 
const char * result_value (size_t i, size_t *len=NULL) const
 
void set_slice_request (bool on)
 
void set_slice_respond (bool on)
 
const redis_resultrequest (size_t argc, const char *argv[], size_t lens[], size_t nchild=0)
 
const redis_resultrequest (const std::vector< string > &args, size_t nchild=0)
 
const stringrequest_buf (void) const
 
void build_request (size_t argc, const char *argv[], size_t lens[])
 
void hash_slot (const char *key)
 
void hash_slot (const char *key, size_t len)
 
int get_slot (void) const
 
bool is_check_addr (void) const
 
const char * get_addr (const char *info)
 
void set_client_addr (const char *addr)
 
void set_client_addr (redis_client &conn)
 
redis_request * get_request_obj (void) const
 
stringget_request_buf (void) const
 
bool is_slice_req (void) const
 
redis_pipeline_messageget_pipeline_message (void)
 

额外继承的成员函数

- 静态 Public 成员函数 继承自 acl::redis_command
static void build_request (size_t argc, const char *argv[], size_t lens[], string &out)
 
- Protected 成员函数 继承自 acl::redis_command
const redis_resultrun (size_t nchild=0, int *timeout=NULL)
 
void clear_request (void)
 
const redis_result ** scan_keys (const char *cmd, const char *key, int &cursor, size_t &size, const char *pattern, const size_t *count)
 
const redis_result ** scan_keys (const char *cmd, const char *key, size_t klen, int &cursor, size_t &size, const char *pattern, const size_t *count)
 
void build (const char *cmd, const char *key, const std::map< string, string > &attrs)
 
void build (const char *cmd, const char *key, size_t klen, const std::map< string, string > &attrs)
 
void build (const char *cmd, const char *key, const std::map< string, const char * > &attrs)
 
void build (const char *cmd, const char *key, const std::vector< string > &names, const std::vector< string > &values)
 
void build (const char *cmd, const char *key, size_t klen, const std::vector< string > &names, const std::vector< string > &values)
 
void build (const char *cmd, const char *key, const std::vector< const char * > &names, const std::vector< const char * > &values)
 
void build (const char *cmd, const char *key, const char *names[], const char *values[], size_t argc)
 
void build (const char *cmd, const char *key, const int names[], const char *values[], size_t argc)
 
void build (const char *cmd, const char *key, const char *names[], const size_t names_len[], const char *values[], const size_t values_len[], size_t argc)
 
void build (const char *cmd, const char *key, size_t klen, const char *names[], const size_t names_len[], const char *values[], const size_t values_len[], size_t argc)
 
void build (const char *cmd, const char *key, const std::vector< string > &names)
 
void build (const char *cmd, const char *key, size_t klen, const std::vector< string > &names)
 
void build (const char *cmd, const char *key, const std::vector< const char * > &names)
 
void build (const char *cmd, const char *key, const std::vector< int > &names)
 
void build (const char *cmd, const char *key, const char *names[], size_t argc)
 
void build (const char *cmd, const char *key, const char *names[], const size_t lens[], size_t argc)
 
void build (const char *cmd, const char *key, size_t klen, const char *names[], const size_t lens[], size_t argc)
 
void build (const char *cmd, const char *key, const int names[], size_t argc)
 
int get_number (bool *success=NULL)
 
long long int get_number64 (bool *success=NULL)
 
int get_number (std::vector< int > &out)
 
int get_number64 (std::vector< long long int > &out)
 
bool check_status (const char *success="OK")
 
int get_status (std::vector< bool > &out)
 
const char * get_status (void)
 
int get_string (string &buf)
 
int get_string (string *buf)
 
int get_string (char *buf, size_t size)
 
int get_strings (std::vector< string > &result)
 
int get_strings (std::vector< string > *result)
 
int get_strings (std::list< string > &result)
 
int get_strings (std::list< string > *result)
 
int get_strings (std::map< string, string > &result)
 
int get_strings (std::vector< string > &names, std::vector< string > &values)
 
int get_strings (std::vector< const char * > &names, std::vector< const char * > &values)
 
void argv_space (size_t n)
 
void build_request1 (size_t argc, const char *argv[], size_t lens[])
 
void build_request2 (size_t argc, const char *argv[], size_t lens[])
 
void logger_result (const redis_result *result)
 
- Protected 成员函数 继承自 acl::acl::noncopyable
 noncopyable ()
 
 ~noncopyable ()
 
- Protected 属性 继承自 acl::redis_command
dbuf_pooldbuf_
 
bool check_addr_
 
char addr_ [32]
 
redis_clientconn_
 
redis_client_clustercluster_
 
redis_client_pipelinepipeline_
 
bool pipe_use_mbox_
 
int slot_
 
int redirect_max_
 
int redirect_sleep_
 
bool slice_req_
 
stringrequest_buf_
 
redis_request * request_obj_
 
size_t argv_size_
 
const char ** argv_
 
size_t * argv_lens_
 
size_t argc_
 
bool slice_res_
 
redis_pipeline_messagepipe_msg_
 
const redis_resultresult_
 

详细描述

在文件 redis_hyperloglog.hpp12 行定义.

构造及析构函数说明

◆ redis_hyperloglog() [1/5]

acl::redis_hyperloglog::redis_hyperloglog ( void  )

◆ redis_hyperloglog() [2/5]

acl::redis_hyperloglog::redis_hyperloglog ( redis_client conn)

◆ redis_hyperloglog() [3/5]

acl::redis_hyperloglog::redis_hyperloglog ( redis_client_cluster cluster)

◆ redis_hyperloglog() [4/5]

ACL_CPP_DEPRECATED acl::redis_hyperloglog::redis_hyperloglog ( redis_client_cluster cluster,
size_t  max_conns 
)

◆ redis_hyperloglog() [5/5]

acl::redis_hyperloglog::redis_hyperloglog ( redis_client_pipeline pipeline)

◆ ~redis_hyperloglog()

virtual acl::redis_hyperloglog::~redis_hyperloglog ( void  )
virtual

成员函数说明

◆ pfadd() [1/3]

int acl::redis_hyperloglog::pfadd ( const char *  key,
const char *  first_element,
  ... 
)

将任意数量的元素添加到指定的 HyperLogLog 里面 add the specified elements to the specified HyperLogLog

参数
key{const char*} 指定 key 值 the key
first_element{const char*} 元素集合的第一个元素值,非空字符串 the first element of the elements list, and the last must be NULL in the elements list
返回
{int} 操作是否成功,同时表明是否发生了变更,返回值含义如下: return the follow values: 1:操作成功,且数据发生了变更(新增数据或老数据发生变更) successful, and the data was varied 0:修改老数据未发生变化 nothing was changed after modifying the old data -1:出错或对应的 key 对象非 hyperloglog 对象 error or the keh isn't a hyperloglog type

◆ pfadd() [2/3]

int acl::redis_hyperloglog::pfadd ( const char *  key,
const std::vector< const char * > &  elements 
)

◆ pfadd() [3/3]

int acl::redis_hyperloglog::pfadd ( const char *  key,
const std::vector< string > &  elements 
)

◆ pfcount() [1/3]

int acl::redis_hyperloglog::pfcount ( const char *  first_key,
  ... 
)

获得给定键列表的 HyperLoglog 去重后元素的近似数量 return the approximated cardinality of the set(s) observed by the hyperloglog at key(s)

参数
first_key{const char*} key 集合的第一个 key,非空字符串 the firs key which must not be NULL of the keys list, and the last parameter must be NULL in keys' list
返回
{int} 键列表集合中经去重后元素的近似数量

◆ pfcount() [2/3]

int acl::redis_hyperloglog::pfcount ( const std::vector< const char * > &  keys)

◆ pfcount() [3/3]

int acl::redis_hyperloglog::pfcount ( const std::vector< string > &  keys)

◆ pfmerge() [1/3]

bool acl::redis_hyperloglog::pfmerge ( const char *  dst,
const char *  first_src,
  ... 
)

将多个 HyperLogLog 合并(merge)为一个 HyperLogLog , 合并后的 HyperLogLog 的基数接近于所有输入 HyperLogLog 的可见集合的并集 merge multiple different hyperloglogs into a single one

参数
dst{const char*} 目标存储 HyperLogLog 对象的键值 the single key as the destination
first_src{const char*} 源对象集合中第一个源 HyperLogLog 对象的键 the first source key which must not be NULL in the sources list, and the last one must be NULL showing the end of the list
返回
{bool} 操作是否成功,返回 false 表明出错或目标/源对象非 HyperLogLog 对象 true on success, false if the error or the dest/src are not hyperloglog

◆ pfmerge() [2/3]

bool acl::redis_hyperloglog::pfmerge ( const char *  dst,
const std::vector< const char * > &  keys 
)

◆ pfmerge() [3/3]

bool acl::redis_hyperloglog::pfmerge ( const char *  dst,
const std::vector< string > &  keys 
)

该类的文档由以下文件生成: