acl  3.5.3.0
acl::redis类 参考

#include <redis.hpp>

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

Public 成员函数

 redis (redis_client *conn=NULL)
 
 redis (redis_client_cluster *cluster)
 
 redis (redis_client_pipeline *pipeline)
 
ACL_CPP_DEPRECATED redis (redis_client_cluster *cluster, size_t max_conns)
 
 ~redis (void)
 
- Public 成员函数 继承自 acl::redis_connection
 redis_connection (void)
 
 redis_connection (redis_client *conn)
 
 redis_connection (redis_client_cluster *cluster)
 
ACL_CPP_DEPRECATED redis_connection (redis_client_cluster *cluster, size_t max_conns)
 
 redis_connection (redis_client_pipeline *pipeline)
 
virtual ~redis_connection (void)
 
bool auth (const char *passwd)
 
bool select (int dbnum)
 
bool ping ()
 
bool echo (const char *s)
 
bool quit ()
 
- 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_hash
 redis_hash (void)
 
 redis_hash (redis_client *conn)
 
 redis_hash (redis_client_cluster *cluster)
 
ACL_CPP_DEPRECATED redis_hash (redis_client_cluster *cluster, size_t max_conns)
 
 redis_hash (redis_client_pipeline *pipeline)
 
virtual ~redis_hash (void)
 
bool hmset (const char *key, const std::map< string, string > &attrs)
 
bool hmset (const char *key, size_t klen, const std::map< string, string > &attrs)
 
bool hmset (const char *key, const std::map< string, const char * > &attrs)
 
bool hmset (const char *key, const std::vector< string > &names, const std::vector< string > &values)
 
bool hmset (const char *key, size_t klen, const std::vector< string > &names, const std::vector< string > &values)
 
bool hmset (const char *key, const std::vector< const char * > &names, const std::vector< const char * > &values)
 
bool hmset (const char *key, const char *names[], const char *values[], size_t argc)
 
bool hmset (const char *key, const char *names[], const size_t names_len[], const char *values[], const size_t values_len[], size_t argc)
 
bool hmset (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)
 
bool hmget (const char *key, const std::vector< string > &names, std::vector< string > *result=NULL)
 
bool hmget (const char *key, size_t klen, const std::vector< string > &names, std::vector< string > *result=NULL)
 
bool hmget (const char *key, const std::vector< const char * > &names, std::vector< string > *result=NULL)
 
bool hmget (const char *key, const char *names[], size_t argc, std::vector< string > *result=NULL)
 
bool hmget (const char *key, const char *names[], const size_t lens[], size_t argc, std::vector< string > *result=NULL)
 
bool hmget (const char *key, size_t klen, const char *names[], const size_t lens[], size_t argc, std::vector< string > *result=NULL)
 
int hset (const char *key, const char *name, const char *value)
 
int hset (const char *key, const char *name, const char *value, size_t value_len)
 
int hset (const char *key, const char *name, size_t name_len, const char *value, size_t value_len)
 
int hset (const char *key, size_t klen, const char *name, size_t name_len, const char *value, size_t value_len)
 
int hsetnx (const char *key, const char *name, const char *value)
 
int hsetnx (const char *key, const char *name, const char *value, size_t value_len)
 
int hsetnx (const char *key, const char *name, size_t name_len, const char *value, size_t value_len)
 
int hsetnx (const char *key, size_t klen, const char *name, size_t name_len, const char *value, size_t value_len)
 
bool hget (const char *key, const char *name, string &result)
 
bool hget (const char *key, const char *name, size_t name_len, string &result)
 
bool hget (const char *key, size_t klen, const char *name, size_t name_len, string &result)
 
bool hgetall (const char *key, std::map< string, string > &result)
 
bool hgetall (const char *key, size_t klen, std::map< string, string > &result)
 
bool hgetall (const char *key, std::vector< string > &names, std::vector< string > &values)
 
bool hgetall (const char *key, size_t klen, std::vector< string > &names, std::vector< string > &values)
 
bool hgetall (const char *key, std::vector< const char * > &names, std::vector< const char * > &values)
 
int hdel (const char *key, const char *first_name)
 
int hdel (const char *key, const char *names[], size_t argc)
 
int hdel (const char *key, const char *names[], const size_t names_len[], size_t argc)
 
int hdel (const char *key, size_t klen, const char *names[], const size_t names_len[], size_t argc)
 
int hdel (const char *key, const std::vector< string > &names)
 
int hdel (const char *key, size_t klen, const std::vector< string > &names)
 
int hdel (const char *key, const std::vector< const char * > &names)
 
int hdel_fields (const char *key, const char *names[], size_t argc)
 
int hdel_fields (const char *key, const char *names[], const size_t names_len[], size_t argc)
 
int hdel_fields (const char *key, size_t klen, const char *names[], const size_t names_len[], size_t argc)
 
int hdel_fields (const char *key, const std::vector< string > &names)
 
int hdel_fields (const char *key, size_t klen, const std::vector< string > &names)
 
int hdel_fields (const char *key, const std::vector< const char * > &names)
 
int hdel_fields (const char *key, const char *first_name,...)
 
bool hincrby (const char *key, const char *name, long long int inc, long long int *result=NULL)
 
bool hincrbyfloat (const char *key, const char *name, double inc, double *result=NULL)
 
bool hkeys (const char *key, std::vector< string > &names)
 
bool hkeys (const char *key, size_t klen, std::vector< string > &names)
 
bool hexists (const char *key, const char *name)
 
bool hexists (const char *key, const char *name, size_t name_len)
 
bool hexists (const char *key, size_t klen, const char *name, size_t name_len)
 
bool hvals (const char *key, std::vector< string > &values)
 
bool hvals (const char *key, size_t klen, std::vector< string > &values)
 
int hlen (const char *key)
 
int hlen (const char *key, size_t klen)
 
int hstrlen (const char *key, const char *name, size_t name_len)
 
int hstrlen (const char *key, size_t klen, const char *name, size_t name_len)
 
int hstrlen (const char *key, const char *name)
 
int hscan (const char *key, int cursor, std::map< string, string > &out, const char *pattern=NULL, const size_t *count=NULL)
 
int hscan (const char *key, size_t klen, int cursor, std::map< string, string > &out, const char *pattern=NULL, const size_t *count=NULL)
 
- Public 成员函数 继承自 acl::redis_hyperloglog
 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_key
 redis_key (void)
 
 redis_key (redis_client *conn)
 
 redis_key (redis_client_cluster *cluster)
 
ACL_CPP_DEPRECATED redis_key (redis_client_cluster *cluster, size_t max_conns)
 
 redis_key (redis_client_pipeline *pipeline)
 
virtual ~redis_key (void)
 
int del_one (const char *key)
 
int del_one (const char *key, size_t len)
 
int del (const char *key)
 
int del (const std::vector< string > &keys)
 
int del (const std::vector< const char * > &keys)
 
int del (const char *keys[], size_t argc)
 
int del (const char *keys[], const size_t lens[], size_t argc)
 
int del_keys (const char *first_key,...)
 
int del_keys (const std::vector< string > &keys)
 
int del_keys (const std::vector< const char * > &keys)
 
int del_keys (const char *keys[], size_t argc)
 
int del_keys (const char *keys[], const size_t lens[], size_t argc)
 
int dump (const char *key, size_t len, string &out)
 
int dump (const char *key, string &out)
 
bool exists (const char *key, size_t len)
 
bool exists (const char *key)
 
int expire (const char *key, size_t len, int n)
 
int expire (const char *key, int n)
 
int expireat (const char *key, size_t len, time_t stamp)
 
int expireat (const char *key, time_t stamp)
 
int keys_pattern (const char *pattern, std::vector< string > *out)
 
bool migrate (const char *key, size_t len, const char *addr, unsigned dest_db, unsigned timeout, const char *option=NULL)
 
bool migrate (const char *key, const char *addr, unsigned dest_db, unsigned timeout, const char *option=NULL)
 
int move (const char *key, size_t len, unsigned dest_db)
 
int move (const char *key, unsigned dest_db)
 
int object_refcount (const char *key, size_t len)
 
int object_refcount (const char *key)
 
bool object_encoding (const char *key, size_t len, string &out)
 
bool object_encoding (const char *key, string &out)
 
int object_idletime (const char *key, size_t len)
 
int object_idletime (const char *key)
 
int persist (const char *key, size_t len)
 
int persist (const char *key)
 
int pexpire (const char *key, size_t len, int n)
 
int pexpire (const char *key, int n)
 
int pexpireat (const char *key, size_t len, long long int n)
 
int pexpireat (const char *key, long long int n)
 
long long int pttl (const char *key, size_t len)
 
long long int pttl (const char *key)
 
bool randomkey (string &buf)
 
bool rename_key (const char *key, const char *newkey)
 
int renamenx (const char *key, const char *newkey)
 
bool restore (const char *key, const char *value, size_t len, int ttl, bool replace=false)
 
int ttl (const char *key, size_t len)
 
int ttl (const char *key)
 
redis_key_t type (const char *key, size_t len)
 
redis_key_t type (const char *key)
 
int scan (int cursor, std::vector< string > &out, const char *pattern=NULL, const size_t *count=NULL)
 
- Public 成员函数 继承自 acl::redis_list
 redis_list (void)
 
 redis_list (redis_client *conn)
 
 redis_list (redis_client_cluster *cluster)
 
ACL_CPP_DEPRECATED redis_list (redis_client_cluster *cluster, size_t max_conns)
 
 redis_list (redis_client_pipeline *pipeline)
 
virtual ~redis_list (void)
 
bool blpop (std::pair< string, string > &result, size_t timeout, const char *first_key,...)
 
bool blpop (const std::vector< const char * > &keys, size_t timeout, std::pair< string, string > &result)
 
bool blpop (const std::vector< string > &keys, size_t timeout, std::pair< string, string > &result)
 
bool brpop (std::pair< string, string > &result, size_t timeout, const char *first_key,...)
 
bool brpop (const std::vector< const char * > &keys, size_t timeout, std::pair< string, string > &result)
 
bool brpop (const std::vector< string > &keys, size_t timeout, std::pair< string, string > &result)
 
bool brpoplpush (const char *src, const char *dst, size_t timeout, string *buf=NULL)
 
bool lindex (const char *key, size_t idx, string &buf)
 
int linsert_before (const char *key, const char *pivot, const char *value)
 
int linsert_before (const char *key, const char *pivot, size_t pivot_len, const char *value, size_t value_len)
 
int linsert_after (const char *key, const char *pivot, const char *value)
 
int linsert_after (const char *key, const char *pivot, size_t pivot_len, const char *value, size_t value_len)
 
int llen (const char *key)
 
int lpop (const char *key, string &buf)
 
int lpush (const char *key, const char *first_value,...)
 
int lpush (const char *key, const char *values[], size_t argc)
 
int lpush (const char *key, const std::vector< string > &values)
 
int lpush (const char *key, const std::vector< const char * > &values)
 
int lpush (const char *key, const char *values[], const size_t lens[], size_t argc)
 
int lpushx (const char *key, const char *value)
 
int lpushx (const char *key, const char *value, size_t len)
 
bool lrange (const char *key, int start, int end, std::vector< string > *result)
 
int lrem (const char *key, int count, const char *value)
 
int lrem (const char *key, int count, const char *value, size_t len)
 
bool lset (const char *key, int idx, const char *value)
 
bool lset (const char *key, int idx, const char *value, size_t len)
 
bool ltrim (const char *key, int start, int end)
 
int rpop (const char *key, string &buf)
 
bool rpoplpush (const char *src, const char *dst, string *buf=NULL)
 
int rpush (const char *key, const char *first_value,...)
 
int rpush (const char *key, const char *values[], size_t argc)
 
int rpush (const char *key, const std::vector< string > &values)
 
int rpush (const char *key, const std::vector< const char * > &values)
 
int rpush (const char *key, const char *values[], const size_t lens[], size_t argc)
 
int rpushx (const char *key, const char *value)
 
int rpushx (const char *key, const char *value, size_t len)
 
- Public 成员函数 继承自 acl::redis_pubsub
 redis_pubsub (void)
 
 redis_pubsub (redis_client *conn)
 
 redis_pubsub (redis_client_cluster *cluster)
 
ACL_CPP_DEPRECATED redis_pubsub (redis_client_cluster *cluster, size_t max_conns)
 
 redis_pubsub (redis_client_pipeline *pipeline)
 
virtual ~redis_pubsub (void)
 
int publish (const char *channel, const char *msg, size_t len)
 
int subscribe (const char *first_channel,...)
 
int subscribe (const std::vector< const char * > &channels)
 
int subscribe (const std::vector< string > &channels)
 
int unsubscribe (const char *first_channel,...)
 
int unsubscribe (const std::vector< const char * > &channels)
 
int unsubscribe (const std::vector< string > &channels)
 
int psubscribe (const char *first_pattern,...)
 
int psubscribe (const std::vector< const char * > &patterns)
 
int psubscribe (const std::vector< string > &patterns)
 
int punsubscribe (const char *first_pattern,...)
 
int punsubscribe (const std::vector< const char * > &patterns)
 
int punsubscribe (const std::vector< string > &patterns)
 
bool get_message (string &channel, string &msg, string *message_type=NULL, string *pattern=NULL, int timeout=-1)
 
int pubsub_channels (std::vector< string > *channels, const char *first_pattern,...)
 
int pubsub_channels (const std::vector< const char * > &patterns, std::vector< string > *channels)
 
int pubsub_channels (const std::vector< string > &patterns, std::vector< string > *channels)
 
int pubsub_numsub (std::map< string, int > &out, const char *first_channel,...)
 
int pubsub_numsub (const std::vector< const char * > &channels, std::map< string, int > &out)
 
int pubsub_numsub (const std::vector< string > &channels, std::map< string, int > &out)
 
int pubsub_numpat ()
 
- Public 成员函数 继承自 acl::redis_script
 redis_script (void)
 
 redis_script (redis_client *conn)
 
 redis_script (redis_client_cluster *cluster)
 
ACL_CPP_DEPRECATED redis_script (redis_client_cluster *cluster, size_t max_conns)
 
 redis_script (redis_client_pipeline *pipeline)
 
virtual ~redis_script (void)
 
const redis_resulteval (const char *script, const std::vector< string > &keys, const std::vector< string > &args)
 
const redis_resulteval (const char *script, const std::vector< const char * > &keys, const std::vector< const char * > &args)
 
const redis_resultevalsha (const char *sha1, const std::vector< string > &keys, const std::vector< string > &args)
 
const redis_resultevalsha (const char *sha1, const std::vector< const char * > &keys, const std::vector< const char * > &args)
 
int script_exists (const std::vector< string > &scripts, std::vector< bool > &out)
 
int script_exists (const std::vector< const char * > &scripts, std::vector< bool > &out)
 
bool script_flush ()
 
bool script_load (const string &script, string &out)
 
bool script_kill ()
 
bool eval_status (const char *script, const std::vector< string > &keys, const std::vector< string > &args, const char *success="OK")
 
bool eval_number (const char *script, const std::vector< string > &keys, const std::vector< string > &args, int &out)
 
bool eval_number64 (const char *script, const std::vector< string > &keys, const std::vector< string > &args, long long int &out)
 
int eval_string (const char *script, const std::vector< string > &keys, const std::vector< string > &args, string &out)
 
bool evalsha_status (const char *script, const std::vector< string > &keys, const std::vector< string > &args, const char *success="OK")
 
bool evalsha_number (const char *script, const std::vector< string > &keys, const std::vector< string > &args, int &out)
 
bool evalsha_number64 (const char *script, const std::vector< string > &keys, const std::vector< string > &args, long long int &out)
 
int evalsha_string (const char *script, const std::vector< string > &keys, const std::vector< string > &args, string &out)
 
int eval_status (const char *script, const std::vector< string > &keys, const std::vector< string > &args, std::vector< bool > &out, const char *success="OK")
 
int eval_number (const char *script, const std::vector< string > &keys, const std::vector< string > &args, std::vector< int > &out, std::vector< bool > &status)
 
long long int eval_number64 (const char *script, const std::vector< string > &keys, const std::vector< string > &args, std::vector< long long int > &out, std::vector< bool > &status)
 
int eval_strings (const char *script, const std::vector< string > &keys, const std::vector< string > &args, std::vector< string > &out)
 
int evalsha_status (const char *script, const std::vector< string > &keys, const std::vector< string > &args, std::vector< bool > &out, const char *success="OK")
 
int evalsha_number (const char *script, const std::vector< string > &keys, const std::vector< string > &args, std::vector< int > &out, std::vector< bool > &status)
 
long long int evalsha_number64 (const char *script, const std::vector< string > &keys, const std::vector< string > &args, std::vector< long long int > &out, std::vector< bool > &status)
 
int evalsha_strings (const char *script, const std::vector< string > &keys, const std::vector< string > &args, std::vector< string > &out)
 
- Public 成员函数 继承自 acl::redis_server
 redis_server (void)
 
 redis_server (redis_client *conn)
 
 redis_server (redis_client_cluster *cluster)
 
ACL_CPP_DEPRECATED redis_server (redis_client_cluster *cluster, size_t max_conns)
 
 redis_server (redis_client_pipeline *pipeline)
 
virtual ~redis_server (void)
 
bool bgrewriteaof (void)
 
bool bgsave (void)
 
bool client_getname (string &buf)
 
bool client_kill (const char *addr)
 
int client_list (string &buf)
 
bool client_setname (const char *name)
 
int config_get (const char *parameter, std::map< string, string > &out)
 
bool config_resetstat (void)
 
bool config_rewrite (void)
 
bool config_set (const char *name, const char *value)
 
int dbsize (void)
 
bool flushall (void)
 
bool flushdb (void)
 
int info (string &buf)
 
int info (std::map< string, string > &out)
 
time_t lastsave (void)
 
bool monitor (void)
 
bool get_command (string &buf)
 
bool save (void)
 
void shutdown (bool save_data=true)
 
bool slaveof (const char *ip, int port)
 
const redis_resultslowlog_get (int number=0)
 
int slowlog_len (void)
 
bool slowlog_reset (void)
 
bool get_time (time_t &stamp, int &escape)
 
- Public 成员函数 继承自 acl::redis_set
 redis_set (void)
 
 redis_set (redis_client *conn)
 
 redis_set (redis_client_cluster *cluster)
 
ACL_CPP_DEPRECATED redis_set (redis_client_cluster *cluster, size_t max_conns)
 
 redis_set (redis_client_pipeline *pipeline)
 
virtual ~redis_set (void)
 
int sadd (const char *key, const char *first_member,...)
 
int sadd (const char *key, const std::vector< const char * > &memsbers)
 
int sadd (const char *key, const std::vector< string > &members)
 
int sadd (const char *key, const char *argv[], size_t argc)
 
int sadd (const char *key, const char *argv[], const size_t lens[], size_t argc)
 
bool spop (const char *key, string &buf)
 
int scard (const char *key)
 
int smembers (const char *key, std::vector< string > *members)
 
int smove (const char *src, const char *dst, const char *member)
 
int smove (const char *src, const char *dst, const string &member)
 
int smove (const char *src, const char *dst, const char *member, size_t len)
 
int sdiff (std::vector< string > *members, const char *first_key,...)
 
int sdiff (const std::vector< const char * > &keys, std::vector< string > *members)
 
int sdiff (const std::vector< string > &keys, std::vector< string > *members)
 
int sinter (std::vector< string > *members, const char *first_key,...)
 
int sinter (const std::vector< const char * > &keys, std::vector< string > *members)
 
int sinter (const std::vector< string > &keys, std::vector< string > *members)
 
int sunion (std::vector< string > *members, const char *first_key,...)
 
int sunion (const std::vector< const char * > &keys, std::vector< string > *members)
 
int sunion (const std::vector< string > &keys, std::vector< string > *members)
 
int sdiffstore (const char *dst, const char *first_key,...)
 
int sdiffstore (const char *dst, const std::vector< const char * > &keys)
 
int sdiffstore (const char *dst, const std::vector< string > &keys)
 
int sinterstore (const char *dst, const char *first_key,...)
 
int sinterstore (const char *dst, const std::vector< const char * > &keys)
 
int sinterstore (const char *dst, const std::vector< string > &keys)
 
int sunionstore (const char *dst, const char *first_key,...)
 
int sunionstore (const char *dst, const std::vector< const char * > &keys)
 
int sunionstore (const char *dst, const std::vector< string > &keys)
 
bool sismember (const char *key, const char *member)
 
bool sismember (const char *key, const char *member, size_t len)
 
int srandmember (const char *key, string &out)
 
int srandmember (const char *key, size_t n, std::vector< string > &out)
 
int srem (const char *key, const char *first_member,...)
 
int srem (const char *key, const std::vector< string > &members)
 
int srem (const char *key, const std::vector< const char * > &members)
 
int srem (const char *key, const char *members[], size_t lens[], size_t argc)
 
int sscan (const char *key, int cursor, std::vector< string > &out, const char *pattern=NULL, const size_t *count=NULL)
 
- Public 成员函数 继承自 acl::redis_string
 redis_string (void)
 
 redis_string (redis_client *conn)
 
 redis_string (redis_client_cluster *cluster)
 
 redis_string (redis_client_pipeline *pipeline)
 
ACL_CPP_DEPRECATED redis_string (redis_client_cluster *cluster, size_t max_conns)
 
virtual ~redis_string (void)
 
bool set (const char *key, const char *value)
 
bool set (const char *key, size_t key_len, const char *value, size_t value_len)
 
bool set (const char *key, const char *value, int timeout, int flag)
 
bool set (const char *key, size_t key_len, const char *value, size_t value_len, int timeout, int flag)
 
bool setex (const char *key, const char *value, int timeout)
 
bool setex (const char *key, size_t key_len, const char *value, size_t value_len, int timeout)
 
bool psetex (const char *key, const char *value, int timeout)
 
bool psetex (const char *key, size_t key_len, const char *value, size_t value_len, int timeout)
 
int setnx (const char *key, const char *value)
 
int setnx (const char *key, size_t key_len, const char *value, size_t value_len)
 
int append (const char *key, const char *value)
 
int append (const char *key, const char *value, size_t size)
 
bool get (const char *key, size_t len, string &buf)
 
bool get (const char *key, string &buf)
 
const redis_resultget (const char *key)
 
const redis_resultget (const char *key, size_t len)
 
bool getset (const char *key, const char *value, string &buf)
 
bool getset (const char *key, size_t key_len, const char *value, size_t value_len, string &buf)
 
int get_strlen (const char *key)
 
int get_strlen (const char *key, size_t key_len)
 
int setrange (const char *key, unsigned offset, const char *value)
 
int setrange (const char *key, size_t key_len, unsigned offset, const char *value, size_t value_len)
 
bool getrange (const char *key, int start, int end, string &buf)
 
bool getrange (const char *key, size_t key_len, int start, int end, string &buf)
 
bool setbit_ (const char *key, unsigned offset, bool bit)
 
bool setbit_ (const char *key, size_t len, unsigned offset, bool bit)
 
bool getbit (const char *key, unsigned offset, int &bit)
 
bool getbit (const char *key, size_t len, unsigned offset, int &bit)
 
int bitcount (const char *key)
 
int bitcount (const char *key, size_t len)
 
int bitcount (const char *key, int start, int end)
 
int bitcount (const char *key, size_t len, int start, int end)
 
int bitop_and (const char *destkey, const std::vector< string > &keys)
 
int bitop_and (const char *destkey, const std::vector< const char * > &keys)
 
int bitop_and (const char *destkey, const char *key,...)
 
int bitop_and (const char *destkey, const char *keys[], size_t size)
 
int bitop_or (const char *destkey, const std::vector< string > &keys)
 
int bitop_or (const char *destkey, const std::vector< const char * > &keys)
 
int bitop_or (const char *destkey, const char *key,...)
 
int bitop_or (const char *destkey, const char *keys[], size_t size)
 
int bitop_xor (const char *destkey, const std::vector< string > &keys)
 
int bitop_xor (const char *destkey, const std::vector< const char * > &keys)
 
int bitop_xor (const char *destkey, const char *key,...)
 
int bitop_xor (const char *destkey, const char *keys[], size_t size)
 
bool mset (const std::map< string, string > &objs)
 
bool mset (const std::vector< string > &keys, const std::vector< string > &values)
 
bool mset (const char *keys[], const char *values[], size_t argc)
 
bool mset (const char *keys[], const size_t keys_len[], const char *values[], const size_t values_len[], size_t argc)
 
int msetnx (const std::map< string, string > &objs)
 
int msetnx (const std::vector< string > &keys, const std::vector< string > &values)
 
int msetnx (const char *keys[], const char *values[], size_t argc)
 
int msetnx (const char *keys[], const size_t keys_len[], const char *values[], const size_t values_len[], size_t argc)
 
bool mget (const std::vector< string > &keys, std::vector< string > *out=NULL)
 
bool mget (const std::vector< const char * > &keys, std::vector< string > *out=NULL)
 
bool mget (std::vector< string > *result, const char *first_key,...)
 
bool mget (const char *keys[], size_t argc, std::vector< string > *out=NULL)
 
bool mget (const char *keys[], const size_t keys_len[], size_t argc, std::vector< string > *out=NULL)
 
bool incr (const char *key, long long int *result=NULL)
 
bool incrby (const char *key, long long int inc, long long int *result=NULL)
 
bool incrbyfloat (const char *key, double inc, double *result=NULL)
 
bool decr (const char *key, long long int *result=NULL)
 
bool decrby (const char *key, long long int dec, long long int *result=NULL)
 
- Public 成员函数 继承自 acl::redis_transaction
 redis_transaction (void)
 
 redis_transaction (redis_client *conn)
 
 redis_transaction (redis_client_cluster *cluster)
 
 redis_transaction (redis_client_pipeline *pipeline)
 
ACL_CPP_DEPRECATED redis_transaction (redis_client_cluster *cluster, size_t max_conns)
 
virtual ~redis_transaction (void)
 
bool watch (const std::vector< string > &keys)
 
bool unwatch (void)
 
bool multi (void)
 
bool exec (void)
 
bool discard (void)
 
bool run_cmd (const char *cmd, const char *argv[], const size_t lens[], size_t argc)
 
bool run_cmd (const char *cmd, const std::vector< string > &args)
 
size_t get_size (void) const
 
const redis_resultget_child (size_t i, string *cmd) const
 
const std::vector< string > & get_commands (void) const
 
- Public 成员函数 继承自 acl::redis_zset
 redis_zset (void)
 
 redis_zset (redis_client *conn)
 
 redis_zset (redis_client_cluster *cluster)
 
 redis_zset (redis_client_pipeline *pipeline)
 
ACL_CPP_DEPRECATED redis_zset (redis_client_cluster *cluster, size_t max_conns)
 
virtual ~redis_zset (void)
 
int zadd (const char *key, const std::map< string, double > &members, const std::vector< string > *options=NULL)
 
int zadd (const char *key, const std::vector< std::pair< string, double > > &members)
 
int zadd (const char *key, const std::vector< std::pair< const char *, double > > &members)
 
int zadd (const char *key, const std::vector< string > &members, const std::vector< double > &scores)
 
int zadd (const char *key, const std::vector< const char * > &members, const std::vector< double > &scores)
 
int zadd (const char *key, const char *members[], double scores[], size_t size)
 
int zadd (const char *key, const char *members[], size_t members_len[], double scores[], size_t size)
 
int zadd_with_ch_xx (const char *key, const std::map< string, double > &members)
 
int zadd_with_ch_nx (const char *key, const std::map< string, double > &members)
 
bool zadd_with_incr (const char *key, const char *member, size_t len, double score, double *result=NULL, const char *option=NULL)
 
bool zadd_with_incr (const char *key, const char *member, double score, double *result=NULL, const char *option=NULL)
 
bool zadd_with_incr_xx (const char *key, const char *member, double score, double *result=NULL)
 
bool zadd_with_incr_nx (const char *key, const char *member, double score, double *result=NULL)
 
int zcard (const char *key)
 
int zcount (const char *key, double min, double max)
 
bool zincrby (const char *key, double inc, const char *member, double *result=NULL)
 
bool zincrby (const char *key, double inc, const char *member, size_t len, double *result=NULL)
 
int zrange (const char *key, int start, int stop, std::vector< string > *result)
 
int zrange_with_scores (const char *key, int start, int stop, std::vector< std::pair< string, double > > &out)
 
int zrangebyscore (const char *key, double min, double max, std::vector< string > *out, const int *offset=NULL, const int *count=NULL)
 
int zrangebyscore (const char *key, const char *min, const char *max, std::vector< string > *out, const int *offset=NULL, const int *count=NULL)
 
int zrangebyscore_with_scores (const char *key, double min, double max, std::vector< std::pair< string, double > > &out, const int *offset=NULL, const int *count=NULL)
 
int zrangebyscore_with_scores (const char *key, const char *min, const char *max, std::vector< std::pair< string, double > > &out, const int *offset=NULL, const int *count=NULL)
 
int zrank (const char *key, const char *member, size_t len)
 
int zrank (const char *key, const char *member)
 
int zrem (const char *key, const char *first_member,...)
 
int zrem (const char *key, const std::vector< string > &members)
 
int zrem (const char *key, const std::vector< const char * > &members)
 
int zrem (const char *key, const char *members[], const size_t lens[], size_t argc)
 
int zremrangebyrank (const char *key, int start, int stop)
 
int zremrangebyscore (const char *key, double min, double max)
 
int zremrangebyscore (const char *key, const char *min, const char *max)
 
int zrevrange (const char *key, int start, int stop, std::vector< string > *result)
 
int zrevrange_with_scores (const char *key, int start, int stop, std::vector< std::pair< string, double > > &out)
 
int zrevrangebyscore_with_scores (const char *key, double min, double max, std::vector< std::pair< string, double > > &out, const int *offset=NULL, const int *count=NULL)
 
int zrevrangebyscore_with_scores (const char *key, const char *min, const char *max, std::vector< std::pair< string, double > > &out, const int *offset=NULL, const int *count=NULL)
 
int zrevrank (const char *key, const char *member, size_t len)
 
int zrevrank (const char *key, const char *member)
 
bool zscore (const char *key, const char *member, size_t len, double &result)
 
bool zscore (const char *key, const char *member, double &result)
 
int zunionstore (const char *dst, const std::map< string, double > &keys, const char *aggregate="SUM")
 
int zunionstore (const char *dst, const std::vector< string > &keys, const std::vector< double > *weights=NULL, const char *aggregate="SUM")
 
int zinterstore (const char *dst, const std::map< string, double > &keys, const char *aggregate="SUM")
 
int zinterstore (const char *dst, const std::vector< string > &keys, const std::vector< double > *weights=NULL, const char *aggregate="SUM")
 
int zscan (const char *key, int cursor, std::vector< std::pair< string, double > > &out, const char *pattern=NULL, const size_t *count=NULL)
 
int zrangebylex (const char *key, const char *min, const char *max, std::vector< string > *out, const int *offset=NULL, const int *count=NULL)
 
int zlexcount (const char *key, const char *min, const char *max)
 
int zremrangebylex (const char *key, const char *min, const char *max)
 
int zpopmin (const char *key, std::vector< std::pair< string, double > > &out, size_t count=1)
 
int zpopmax (const char *key, std::vector< std::pair< string, double > > &out, size_t count=1)
 
int bzpopmin (const char *key, size_t timeout, string &member, double *score=NULL)
 
int bzpopmax (const char *key, size_t timeout, string &member, double *score=NULL)
 
int bzpopmin (const std::vector< string > &keys, size_t timeout, string &member, double *score=NULL)
 
int bzpopmax (const std::vector< string > &keys, size_t timeout, string &member, double *score=NULL)
 
- Public 成员函数 继承自 acl::redis_cluster
 redis_cluster (void)
 
 redis_cluster (redis_client *conn)
 
 redis_cluster (redis_client_cluster *cluster)
 
ACL_CPP_DEPRECATED redis_cluster (redis_client_cluster *cluster, size_t max_conns)
 
 redis_cluster (redis_client_pipeline *pipeline)
 
virtual ~redis_cluster (void)
 
bool cluster_addslots (int first,...)
 
bool cluster_addslots (const int slot_list[], size_t n)
 
bool cluster_addslots (const std::vector< int > &slot_list)
 
bool cluster_delslots (int first,...)
 
bool cluster_delslots (const int slot_list[], size_t n)
 
bool cluster_delslots (const std::vector< int > &slot_list)
 
int cluster_getkeysinslot (size_t slot, size_t max, std::list< string > &result)
 
bool cluster_meet (const char *ip, int port)
 
bool cluster_reset ()
 
bool cluster_reset_hard ()
 
bool cluster_reset_soft ()
 
bool cluster_setslot_importing (size_t slot, const char *src_node)
 
bool cluster_setslot_migrating (size_t slot, const char *dst_node)
 
bool cluster_setslot_stable (size_t slot)
 
bool cluster_setslot_node (size_t slot, const char *node)
 
int cluster_count_failure_reports (const char *node)
 
bool cluster_failover ()
 
bool cluster_failover_force ()
 
bool cluster_failover_takeover ()
 
bool cluster_info (std::map< string, string > &result)
 
bool cluster_saveconfig ()
 
int cluster_countkeysinslot (size_t slot)
 
bool cluster_forget (const char *node)
 
int cluster_keyslot (const char *key)
 
bool cluster_replicate (const char *node)
 
bool cluster_set_config_epoch (const char *epoch)
 
const std::vector< redis_slot * > * cluster_slots ()
 
const std::map< string, redis_node * > * cluster_nodes ()
 
const std::vector< redis_node * > * cluster_slaves (const char *node)
 
- Public 成员函数 继承自 acl::redis_geo
 redis_geo ()
 
 redis_geo (redis_client *conn)
 
 redis_geo (redis_client_cluster *cluster)
 
ACL_CPP_DEPRECATED redis_geo (redis_client_cluster *cluster, size_t max_conns)
 
 redis_geo (redis_client_pipeline *pipeline)
 
virtual ~redis_geo ()
 
int geoadd (const char *key, const char *member, double longitude, double latitude)
 
int geoadd (const char *key, size_t size, const char *members[], const double longitudes[], const double latitudes[])
 
int geoadd (const char *key, const std::vector< string > &members, const std::vector< double > &longitudes, const std::vector< double > &latitudes)
 
bool geohash (const char *key, const std::vector< string > &members, std::vector< string > &results)
 
bool geohash (const char *key, const char *member, string &result)
 
bool geopos (const char *key, const std::vector< string > &members, std::vector< std::pair< double, double > > &results)
 
bool geopos (const char *key, const char *member, std::pair< double, double > &result)
 
double geodist (const char *key, const char *member1, const char *member2, int unit=GEO_UNIT_M)
 
const std::vector< geo_member > & georadius (const char *key, double longitude, double latitude, double radius, int unit=GEO_UNIT_M, int with=GEO_WITH_COORD|GEO_WITH_DIST, int sort=GEO_SORT_ASC)
 
const std::vector< geo_member > & georadiusbymember (const char *key, const char *member, double radius, int unit=GEO_UNIT_M, int with=GEO_WITH_COORD|GEO_WITH_DIST, int sort=GEO_SORT_ASC)
 
- Public 成员函数 继承自 acl::redis_stream
 redis_stream (void)
 
 redis_stream (redis_client *conn)
 
 redis_stream (redis_client_cluster *cluster)
 
 redis_stream (redis_client_pipeline *pipeline)
 
ACL_CPP_DEPRECATED redis_stream (redis_client_cluster *cluster, size_t max_conns)
 
virtual ~redis_stream (void)
 
bool xadd (const char *key, const std::map< string, string > &fields, string &result, const char *id="*")
 
bool xadd (const char *key, const std::vector< string > &names, const std::vector< string > &values, string &result, const char *id="*")
 
bool xadd (const char *key, const std::vector< const char * > &names, const std::vector< const char * > &values, string &result, const char *id="*")
 
bool xadd (const char *key, const char *names[], const size_t names_len[], const char *values[], const size_t values_len[], size_t argc, string &result, const char *id="*")
 
bool xadd_with_maxlen (const char *key, size_t maxlen, const std::map< string, string > &fields, string &result, const char *id="*")
 
int xlen (const char *key)
 
int xdel (const char *key, const char *id)
 
int xdel (const char *key, const std::vector< string > &ids)
 
int xdel (const char *key, const std::vector< const char * > &ids)
 
int xtrim (const char *key, size_t maxlen, bool tilde=false)
 
bool xread (redis_stream_messages &messages, const std::map< string, string > &streams, size_t count=1000, ssize_t block=0)
 
bool xreadgroup (redis_stream_messages &messages, const char *group, const char *consumer, const std::map< string, string > &streams, size_t count=1000, ssize_t block=0, bool noack=false)
 
bool xreadgroup_with_noack (redis_stream_messages &messages, const char *group, const char *consumer, const std::map< string, string > &streams, size_t count=1000, ssize_t block=0)
 
bool xrange (redis_stream_messages &messages, const char *key, const char *start="-", const char *end="+", size_t count=1000)
 
bool xrevrange (redis_stream_messages &messages, const char *key, const char *start="+", const char *end="-", size_t count=1000)
 
bool xclaim (std::vector< redis_stream_message > &messages, const char *key, const char *group, const char *consumer, long min_idle_time, const std::vector< string > &ids, size_t idle=0, long long time_ms=-1, int retry_count=-1, bool force=false)
 
bool xclaim_with_justid (std::vector< string > &messages_ids, const char *key, const char *group, const char *consumer, long min_idle_time, const std::vector< string > &ids, size_t idle=0, long long time_ms=-1, int retry_count=-1, bool force=false)
 
int xack (const char *key, const char *group, const char *id)
 
int xack (const char *key, const char *group, const std::vector< string > &ids)
 
int xack (const char *key, const char *group, const std::vector< const char * > &ids)
 
int xack (const char *key, const char *group, const std::list< string > &ids, size_t size)
 
int xack (const char *key, const char *group, const std::list< const char * > &ids, size_t size)
 
bool xpending_summary (const char *key, const char *group, redis_pending_summary &result)
 
bool xpending_detail (redis_pending_detail &result, const char *key, const char *group, const char *start_id="-", const char *end_id="+", size_t count=1, const char *consumer=NULL)
 
bool xgroup_help (std::vector< string > &result)
 
bool xgroup_create (const char *key, const char *group, const char *id="$", bool mkstream=true)
 
int xgroup_destroy (const char *key, const char *group)
 
bool xgroup_setid (const char *key, const char *group, const char *id="$")
 
int xgroup_delconsumer (const char *key, const char *group, const char *consumer)
 
bool xinfo_help (std::vector< string > &result)
 
bool xinfo_consumers (const char *key, const char *group, std::map< string, redis_xinfo_consumer > &result)
 
bool xinfo_groups (const char *key, std::map< string, redis_xinfo_group > &result)
 
bool xinfo_stream (const char *key, redis_stream_info &result)
 

额外继承的成员函数

- 静态 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 命令类,因此可以只通过此类对象使用所有的 redis 命令。 inherit all the redis command class, which include all the commands of Key, String, Hash, List, Set, SortedSet, Hyperloglog, Pub/Sub, Transaction, Script, Connection, Server.

在文件 redis.hpp30 行定义.

构造及析构函数说明

◆ redis() [1/4]

acl::redis::redis ( redis_client conn = NULL)

非集群方式的构造函数 the constructor with no redis cluster

参数
conn{redis_client*} 一个 redis 节点的连接对象 one redis node's connection

◆ redis() [2/4]

acl::redis::redis ( redis_client_cluster cluster)

集群方式的构造函数 the constructor in redis cluster mode

参数
cluster{redis_client_cluster*} 集群对象 the redis cluster object

◆ redis() [3/4]

acl::redis::redis ( redis_client_pipeline pipeline)

pipeline 方式的构造函数 the constructor in redis pipeline mode

参数
pipeline{redis_client_pipeline*} pipeline 对象 the redis pipeline object

◆ redis() [4/4]

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

◆ ~redis()

acl::redis::~redis ( void  )
inline

在文件 redis.hpp75 行定义.

75 {}

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