xRedis API  1.5.0
The C++ Client API for Redis server
 All Classes
Public Member Functions | Static Public Member Functions | List of all members
xrc::xRedisClient Class Reference

Public Member Functions

bool Init (uint32_t maxtype)
 
void Release ()
 
void Keepalive ()
 
RedisPoolGetRedisPool ()
 
bool GetxRedisContext (const SliceIndex &index, xRedisContext *ctx)
 
void FreexRedisContext (xRedisContext *ctx)
 
bool ConnectRedisCache (const RedisNode *redisnodelist, uint32_t nodecount, uint32_t hashbase, uint32_t cachetype)
 
bool echo (const SliceIndex &index, const std::string &str, std::string &value)
 
void quit ()
 
bool append (const SliceIndex &index, const std::string &key, const std::string &value)
 
bool bitcount (const SliceIndex &index, const std::string &key, int32_t &count, int32_t start=0, int32_t end=0)
 
bool bitop (const SliceIndex &index, const BITOP operation, const std::string &destkey, const KEYS &keys, int32_t &lenght)
 
bool bitpos (const SliceIndex &index, const std::string &key, int32_t bit, int64_t &pos, int32_t start=0, int32_t end=0)
 
bool decr (const SliceIndex &index, const std::string &key, int64_t &result)
 
bool decrby (const SliceIndex &index, const std::string &key, int32_t by, int64_t &result)
 
bool get (const SliceIndex &index, const std::string &key, std::string &value)
 
bool getbit (const SliceIndex &index, const std::string &key, int32_t &offset, int32_t &bit)
 
bool getrange (const SliceIndex &index, const std::string &key, int32_t start, int32_t end, std::string &out)
 
bool getset (const SliceIndex &index, const std::string &key, const std::string &newValue, std::string &oldValue)
 
bool incr (const SliceIndex &index, const std::string &key, int64_t &result)
 
bool incrby (const SliceIndex &index, const std::string &key, int32_t by, int64_t &result)
 
bool mget (const DBIArray &index, const KEYS &keys, ReplyData &vDdata)
 
bool mset (const DBIArray &index, const VDATA &data)
 
bool psetex (const SliceIndex &index, const std::string &key, int32_t milliseconds, const std::string &value)
 
bool set (const SliceIndex &index, const std::string &key, const std::string &value)
 
bool set (const SliceIndex &index, const std::string &key, const char *value, int32_t len, int32_t second)
 
bool set (const SliceIndex &index, const std::string &key, const std::string &value, SETPXEX pxex, int32_t expiretime, SETNXXX nxxx)
 
bool setbit (const SliceIndex &index, const std::string &key, int32_t offset, int64_t newbitValue, int64_t oldbitValue)
 
bool setex (const SliceIndex &index, const std::string &key, int32_t seconds, const std::string &value)
 
bool setnx (const SliceIndex &index, const std::string &key, const std::string &value)
 
bool setrange (const SliceIndex &index, const std::string &key, int32_t offset, const std::string &value, int32_t &length)
 
bool strlen (const SliceIndex &index, const std::string &key, int32_t &length)
 
bool del (const SliceIndex &index, const std::string &key)
 
bool del (const DBIArray &index, const KEYS &vkey, int64_t &count)
 
bool exists (const SliceIndex &index, const std::string &key)
 
bool expire (const SliceIndex &index, const std::string &key, uint32_t second)
 
bool expireat (const SliceIndex &index, const std::string &key, uint32_t timestamp)
 
bool persist (const SliceIndex &index, const std::string &key)
 
bool pexpire (const SliceIndex &index, const std::string &key, uint32_t milliseconds)
 
bool pexpireat (const SliceIndex &index, const std::string &key, uint32_t millisecondstimestamp)
 
bool pttl (const SliceIndex &index, const std::string &key, int64_t &milliseconds)
 
bool randomkey (const SliceIndex &index, KEY &key)
 
bool scan (const SliceIndex &index, int64_t &cursor, const char *pattern, uint32_t count, ArrayReply &array, xRedisContext &ctx)
 
bool sort (const SliceIndex &index, ArrayReply &array, const std::string &key, const char *by=NULL, LIMIT *limit=NULL, bool alpha=false, const FILEDS *get=NULL, const SORTODER order=ASC, const char *destination=NULL)
 
bool ttl (const SliceIndex &index, const std::string &key, int64_t &seconds)
 
bool type (const SliceIndex &index, const std::string &key, std::string &value)
 
bool hdel (const SliceIndex &index, const std::string &key, const std::string &field, int64_t &num)
 
bool hdel (const SliceIndex &index, const std::string &key, const KEYS &vfiled, int64_t &num)
 
bool hexist (const SliceIndex &index, const std::string &key, const std::string &field)
 
bool hget (const SliceIndex &index, const std::string &key, const std::string &field, std::string &value)
 
bool hgetall (const SliceIndex &index, const std::string &key, ArrayReply &array)
 
bool hincrby (const SliceIndex &index, const std::string &key, const std::string &field, int64_t increment, int64_t &value)
 
bool hincrbyfloat (const SliceIndex &index, const std::string &key, const std::string &field, const float increment, float &value)
 
bool hkeys (const SliceIndex &index, const std::string &key, KEYS &keys)
 
bool hlen (const SliceIndex &index, const std::string &key, int64_t &count)
 
bool hmget (const SliceIndex &index, const std::string &key, const KEYS &field, ArrayReply &array)
 
bool hmset (const SliceIndex &index, const std::string &key, const VDATA &vData)
 
bool hscan (const SliceIndex &index, const std::string &key, int64_t &cursor, const char *pattern, uint32_t count, ArrayReply &array, xRedisContext &ctx)
 
bool hset (const SliceIndex &index, const std::string &key, const std::string &field, const std::string &value, int64_t &retval)
 
bool hsetnx (const SliceIndex &index, const std::string &key, const std::string &field, const std::string &value)
 
bool hvals (const SliceIndex &index, const std::string &key, VALUES &values)
 
bool blPop (const SliceIndex &index, const std::string &key, VALUES &vValues, int64_t timeout)
 
bool brPop (const SliceIndex &index, const std::string &key, VALUES &vValues, int64_t timeout)
 
bool brPoplpush (const SliceIndex &index, const std::string &key, std::string &targetkey, VALUE &value, int64_t timeout)
 
bool lindex (const SliceIndex &index, const std::string &key, int64_t idx, VALUE &value)
 
bool linsert (const SliceIndex &index, const std::string &key, LMODEL mod, const std::string &pivot, const std::string &value, int64_t &retval)
 
bool llen (const SliceIndex &index, const std::string &key, int64_t &len)
 
bool lpop (const SliceIndex &index, const std::string &key, std::string &value)
 
bool lpush (const SliceIndex &index, const std::string &key, const VALUES &vValue, int64_t &length)
 
bool lpushx (const SliceIndex &index, const std::string &key, const std::string &value, int64_t &length)
 
bool lrange (const SliceIndex &index, const std::string &key, int64_t start, int64_t end, ArrayReply &array)
 
bool lrem (const SliceIndex &index, const std::string &key, int32_t count, const std::string &value, int64_t num)
 
bool lset (const SliceIndex &index, const std::string &key, int32_t idx, const std::string &value)
 
bool ltrim (const SliceIndex &index, const std::string &key, int32_t start, int32_t end)
 
bool rpop (const SliceIndex &index, const std::string &key, std::string &value)
 
bool rpoplpush (const SliceIndex &index, const std::string &key_src, const std::string &key_dest, std::string &value)
 
bool rpush (const SliceIndex &index, const std::string &key, const VALUES &vValue, int64_t &length)
 
bool rpushx (const SliceIndex &index, const std::string &key, const std::string &value, int64_t &length)
 
bool sadd (const SliceIndex &index, const KEY &key, const VALUES &vValue, int64_t &count)
 
bool scard (const SliceIndex &index, const KEY &key, int64_t &count)
 
bool sdiff (const DBIArray &index, const KEYS &vKkey, VALUES &vValue)
 
bool sdiffstore (const SliceIndex &index, const KEY &destinationkey, const DBIArray &vdbi, const KEYS &vkey, int64_t &count)
 
bool sinter (const DBIArray &index, const KEYS &vkey, VALUES &vValue)
 
bool sinterstore (const SliceIndex &index, const KEY &destinationkey, const DBIArray &vdbi, const KEYS &vkey, int64_t &count)
 
bool sismember (const SliceIndex &index, const KEY &key, const VALUE &member)
 
bool smembers (const SliceIndex &index, const KEY &key, VALUES &vValue)
 
bool smove (const SliceIndex &index, const KEY &srckey, const KEY &deskey, const VALUE &member)
 
bool spop (const SliceIndex &index, const KEY &key, VALUE &member)
 
bool srandmember (const SliceIndex &index, const KEY &key, VALUES &vmember, int32_t num=0)
 
bool srem (const SliceIndex &index, const KEY &key, const VALUES &vmembers, int64_t &count)
 
bool sscan (const SliceIndex &index, const std::string &key, int64_t &cursor, const char *pattern, uint32_t count, ArrayReply &array, xRedisContext &ctx)
 
bool sunion (const DBIArray &index, const KEYS &vkey, VALUES &vValue)
 
bool sunionstore (const SliceIndex &index, const KEY &deskey, const DBIArray &vdbi, const KEYS &vkey, int64_t &count)
 
bool zadd (const SliceIndex &index, const KEY &deskey, const VALUES &vValues, int64_t &count)
 
bool zscrad (const SliceIndex &index, const std::string &key, int64_t &num)
 
bool zincrby (const SliceIndex &index, const std::string &key, const double &increment, const std::string &member, std::string &value)
 
bool zpopmax (const SliceIndex &index, const std::string &key, VALUES &vValues)
 
bool zpopmin (const SliceIndex &index, const std::string &key, VALUES &vValues)
 
bool zrange (const SliceIndex &index, const std::string &key, int32_t start, int32_t end, VALUES &vValues, bool withscore=false)
 
bool zrangebyscore (const SliceIndex &index, const std::string &key, const std::string &min, const std::string &max, VALUES &vValues, bool withscore=false, LIMIT *limit=NULL)
 
bool zrank (const SliceIndex &index, const std::string &key, const std::string &member, int64_t &rank)
 
bool zrem (const SliceIndex &index, const KEY &key, const VALUES &vmembers, int64_t &num)
 
bool zremrangebyrank (const SliceIndex &index, const std::string &key, int32_t start, int32_t stop, int64_t &num)
 
bool zremrangebyscore (const SliceIndex &index, const KEY &key, double min, double max, int64_t &count)
 
bool zrevrange (const SliceIndex &index, const std::string &key, int32_t start, int32_t end, VALUES &vValues, bool withscore=false)
 
bool zrevrangebylex (const SliceIndex &index, const std::string &key, std::string &start, std::string &end, VALUES &vValues, int32_t offset=0, int32_t count=0)
 
bool zrevrank (const SliceIndex &index, const std::string &key, const std::string &member, int64_t &rank)
 
bool zscan (const SliceIndex &index, const std::string &key, int64_t &cursor, const char *pattern, uint32_t count, ArrayReply &array, xRedisContext &ctx)
 
bool zscore (const SliceIndex &index, const std::string &key, const std::string &member, std::string &score)
 
bool psubscribe (const SliceIndex &index, const KEYS &patterns, xRedisContext &ctx)
 
bool publish (const SliceIndex &index, const KEY &channel, const std::string &message, int64_t &count)
 
bool pubsub_channels (const SliceIndex &index, const std::string &pattern, ArrayReply &reply)
 
bool pubsub_numsub (const SliceIndex &index, const KEYS &keys, ArrayReply &reply)
 
bool pubsub_numpat (const SliceIndex &index, int64_t &count)
 
bool punsubscribe (const SliceIndex &index, const KEYS &patterns, xRedisContext &ctx)
 
bool subscribe (const SliceIndex &index, const KEYS &channels, xRedisContext &ctx)
 
bool unsubscribe (const SliceIndex &index, const KEYS &channels, xRedisContext &ctx)
 
bool command_bool (const SliceIndex &index, const char *cmd,...)
 
bool command_status (const SliceIndex &index, const char *cmd,...)
 
bool command_integer (const SliceIndex &index, int64_t &intval, const char *cmd,...)
 
bool command_string (const SliceIndex &index, std::string &data, const char *cmd,...)
 
bool command_list (const SliceIndex &index, VALUES &vValue, const char *cmd,...)
 
bool command_array (const SliceIndex &index, ArrayReply &array, const char *cmd,...)
 
rReplycommand (const SliceIndex &index, const char *cmd)
 

Static Public Member Functions

static void FreeReply (const rReply *reply)
 
static int32_t GetReply (xRedisContext *ctx, ReplyData &vData)
 
static void SetLogLevel (uint32_t level, void(*emit)(int level, const char *line))
 

Detailed Description

Examples:
demo.cpp, demo_multi_slice.cpp, demo_slice.cpp, and xredis-example.cpp.

The documentation for this class was generated from the following files:

Generated on Mon Mar 21 2022 10:57:13 for xRedis API version 1.5.0.