bool xRedisClient::smove(const RedisDBIdx& dbi, const KEY& srckey, const KEY& deskey, const VALUE& member) { if (0 == srckey.length()) { return false; } SETDEFAULTIOTYPE(MASTER); return command_bool(dbi, "SMOVE %s", srckey.c_str(), deskey.c_str(), member.c_str()); }
bool xRedisClient::srandmember(const RedisDBIdx& dbi, const KEY& key, VALUES& members, int count) { if (0 == key.length()) { return false; } SETDEFAULTIOTYPE(SLAVE); if (0 == count) { return command_list(dbi, members, "SRANDMEMBER %s", key.c_str()); } return command_list(dbi, members, "SRANDMEMBER %s %d", key.c_str(), count); }
bool xRedisClient::spop(const RedisDBIdx& dbi, const KEY& key, VALUE& member) { if (0 == key.length()) { return false; } SETDEFAULTIOTYPE(MASTER); return command_string(dbi, member, "SPOP %s", key.c_str()); }
bool xRedisClient::smembers(const RedisDBIdx& dbi, const KEY& key, VALUES& vValue) { if (0 == key.length()) { return false; } SETDEFAULTIOTYPE(SLAVE); return command_list(dbi, vValue, "SMEMBERS %s", key.c_str()); }
bool xRedisClient::smove(const RedisDBIdx& dbi, const KEY& srckey, const KEY& deskey, const VALUE& member) { return command_bool(dbi, "SMOVE %s", srckey.c_str(), deskey.c_str(), member.c_str()); }
bool xRedisClient::smember(const RedisDBIdx& dbi, const KEY& key, VALUES& vValue) { return command_list(dbi, vValue, "SMEMBER %s", key.c_str()); }
bool xRedisClient::sismember(const RedisDBIdx& dbi, const KEY& key, const VALUE& member) { return command_bool(dbi, "SISMEMBER %s %s", key.c_str(), member.c_str()); }
bool xRedisClient::srandmember(const RedisDBIdx& dbi, const KEY& key, VALUES& members, int count) { if (0==count) { return command_list(dbi, members, "SRANDMEMBER %s", key.c_str()); } return command_list(dbi, members, "SRANDMEMBER %s %d", key.c_str(), count); }
bool xRedisClient::spop(const RedisDBIdx& dbi, const KEY& key, VALUE& member) { return command_string(dbi, member, "SPOP %s", key.c_str()); }