diff --git a/modules/redis/src/main/java/org/springside/modules/nosql/redis/JedisScriptExecutor.java b/modules/redis/src/main/java/org/springside/modules/nosql/redis/JedisScriptExecutor.java index 135202a66..2c1916859 100644 --- a/modules/redis/src/main/java/org/springside/modules/nosql/redis/JedisScriptExecutor.java +++ b/modules/redis/src/main/java/org/springside/modules/nosql/redis/JedisScriptExecutor.java @@ -25,6 +25,8 @@ * 装载并执行Lua Script, * * 如果服务器上因为集群多台服务器或重启等原因没有装载script,会自动重新装载后重试。 + * + * 因为涉及到的key未知,暂时不支持Sharding。 */ public class JedisScriptExecutor { private static Logger logger = LoggerFactory.getLogger(JedisScriptExecutor.class); diff --git a/modules/redis/src/main/java/org/springside/modules/nosql/redis/JedisShardedTemplate.java b/modules/redis/src/main/java/org/springside/modules/nosql/redis/JedisShardedTemplate.java index e3a16d184..2e7f9c3cc 100644 --- a/modules/redis/src/main/java/org/springside/modules/nosql/redis/JedisShardedTemplate.java +++ b/modules/redis/src/main/java/org/springside/modules/nosql/redis/JedisShardedTemplate.java @@ -27,10 +27,11 @@ * Pass more than one JedisPool to the it, it will calculate which jedisPool will handle the key. If * only one jedisPool passed, it won't do the calculation, so please use JedisShardedTemplate by default. * - * Limitation: JedisShardedTemplate donen't support multi-key actions like: - * 1. Lua Script - * 2. Pipelined and Transaction process multi-key - * 3. Methods in @redis.clients.jedis.MultiKeyCommands like mget, rpoplpush.... + * But it doesn't support multi-key actions by default, like: + * 1. Pipelined and Transaction process multi-keys + * 2. Methods in @redis.clients.jedis.MultiKeyCommands like mget, rpoplpush.... + * + * To support them, please use a common sharding key relate to these keys when invoke the APIs. */ public class JedisShardedTemplate { @@ -77,7 +78,9 @@ public JedisTemplate getShard(String key) { } /* - * Execute the action, the action must process only one key. + * Execute the action. + * + * @key the action must process only this key, or this key is a sharding key. */ public T execute(String key, JedisAction jedisAction) throws JedisException { JedisTemplate jedisTemplate = getShard(key); @@ -85,7 +88,9 @@ public T execute(String key, JedisAction jedisAction) throws JedisExcepti } /* - * Execute the action, the action must process only one key. + * Execute the action. + * + * @key the action must process only this key, or this key is a sharding key. */ public void execute(String key, JedisActionNoResult jedisAction) throws JedisException { JedisTemplate jedisTemplate = getShard(key); @@ -93,7 +98,9 @@ public void execute(String key, JedisActionNoResult jedisAction) throws JedisExc } /* - * Execute the action, the action must process only one key. + * Execute the pipeline. + * + * @key the action must process only this key, or this key is a sharding key. */ public List execute(String key, PipelineAction pipelineAction) throws JedisException { JedisTemplate jedisTemplate = getShard(key); @@ -101,7 +108,9 @@ public List execute(String key, PipelineAction pipelineAction) throws Je } /* - * Execute the action, the action must process only one key. + * Execute the pipeline. + * + * @key the action must process only this key, or this key is a sharding key. */ public void execute(String key, PipelineActionNoResult pipelineAction) throws JedisException { JedisTemplate jedisTemplate = getShard(key); @@ -115,6 +124,11 @@ public Boolean del(final String key) { return jedisTemplate.del(key); } + public Boolean del(final String shardingKey, final String key) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.del(key); + } + // / String Actions /// public String get(final String key) { @@ -122,66 +136,131 @@ public String get(final String key) { return jedisTemplate.get(key); } + public String get(final String shardingKey, final String key) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.get(key); + } + public Long getAsLong(final String key) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.getAsLong(key); } + public Long getAsLong(final String shardingKey, final String key) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.getAsLong(key); + } + public Integer getAsInt(final String key) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.getAsInt(key); } + public Integer getAsInt(final String shardingKey, final String key) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.getAsInt(key); + } + public void set(final String key, final String value) { JedisTemplate jedisTemplate = getShard(key); jedisTemplate.set(key, value); } - public void setex(String key, String value, int seconds) { + public void set(final String shardingKey, final String key, final String value) { + JedisTemplate jedisTemplate = getShard(shardingKey); + jedisTemplate.set(key, value); + } + + public void setex(final String key, final String value, final int seconds) { JedisTemplate jedisTemplate = getShard(key); jedisTemplate.setex(key, value, seconds); } - public Boolean setnx(String key, String value) { + public void setex(final String shardingKey, final String key, final String value, final int seconds) { + JedisTemplate jedisTemplate = getShard(shardingKey); + jedisTemplate.setex(key, value, seconds); + } + + public Boolean setnx(final String key, final String value) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.setnx(key, value); } - public Boolean setnxex(String key, String value, int seconds) { + public Boolean setnx(final String shardingKey, final String key, final String value) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.setnx(key, value); + } + + public Boolean setnxex(final String key, final String value, final int seconds) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.setnxex(key, value, seconds); } - public String getSet(String key, String value) { + public Boolean setnxex(final String shardingKey, final String key, final String value, final int seconds) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.setnxex(key, value, seconds); + } + + public String getSet(final String key, final String value) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.getSet(key, value); } - public Long incr(String key) { + public String getSet(final String shardingKey, final String key, final String value) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.getSet(key, value); + } + + public Long incr(final String key) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.incr(key); } - public Long incrBy(String key, Long increment) { + public Long incr(final String shardingKey, final String key) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.incr(key); + } + + public Long incrBy(final String key, final Long increment) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.incrBy(key, increment); } + public Long incrBy(final String shardingKey, final String key, final Long increment) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.incrBy(key, increment); + } + public Double incrByFloat(final String key, final double increment) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.incrByFloat(key, increment); } - public Long decr(String key) { + public Double incrByFloat(final String shardingKey, final String key, final double increment) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.incrByFloat(key, increment); + } + + public Long decr(final String key) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.decr(key); } - public Long decrBy(String key, Long decrement) { + public Long decr(final String shardingKey, final String key) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.decr(key); + } + + public Long decrBy(final String key, final Long decrement) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.decrBy(key, decrement); } + public Long decrBy(final String shardingKey, final String key, final Long decrement) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.decrBy(key, decrement); + } + // / Hash Actions /// public String hget(final String key, final String field) { @@ -189,65 +268,161 @@ public String hget(final String key, final String field) { return jedisTemplate.hget(key, field); } - public List hmget(String key, String[] fields) { + public String hget(final String shardingKey, final String key, final String field) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.hget(key, field); + } + + public List hmget(final String key, final String field) { + JedisTemplate jedisTemplate = getShard(key); + return jedisTemplate.hmget(key, field); + } + + public List hmget(final String key, final String[] fields) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.hmget(key, fields); } + public List hmget(final String shardingKey, final String key, final String field) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.hmget(key, field); + } + + public List hmget(final String shardingKey, final String key, final String[] fields) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.hmget(key, fields); + } + public Map hgetAll(final String key) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.hgetAll(key); } + public Map hgetAll(final String shardingKey, final String key) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.hgetAll(key); + } + public void hset(final String key, final String field, final String value) { JedisTemplate jedisTemplate = getShard(key); jedisTemplate.hset(key, field, value); } - public void hmset(String key, Map map) { + public void hset(final String shardingKey, final String key, final String field, final String value) { + JedisTemplate jedisTemplate = getShard(shardingKey); + jedisTemplate.hset(key, field, value); + } + + public void hmset(final String key, final Map map) { JedisTemplate jedisTemplate = getShard(key); jedisTemplate.hmset(key, map); } + public void hmset(final String shardingKey, final String key, final Map map) { + JedisTemplate jedisTemplate = getShard(shardingKey); + jedisTemplate.hmset(key, map); + } + public Boolean hsetnx(final String key, final String fieldName, final String value) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.hsetnx(key, fieldName, value); } + public Boolean hsetnx(final String shardingKey, final String key, final String fieldName, final String value) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.hsetnx(key, fieldName, value); + } + public Long hincrBy(final String key, final String fieldName, final long increment) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.hincrBy(key, fieldName, increment); } + public Long hincrBy(final String shardingKey, final String key, final String fieldName, final long increment) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.hincrBy(key, fieldName, increment); + } + public Double hincrByFloat(final String key, final String fieldName, final double increment) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.hincrByFloat(key, fieldName, increment); } - public Long hdel(final String key, final String... fieldsName) { + public Double hincrByFloat(final String shardingKey, final String key, final String fieldName, + final double increment) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.hincrByFloat(key, fieldName, increment); + } + + public Long hdel(final String key, final String fieldsName) { + JedisTemplate jedisTemplate = getShard(key); + return jedisTemplate.hdel(key, fieldsName); + } + + public Long hdel(final String key, final String[] fieldsNames) { JedisTemplate jedisTemplate = getShard(key); + return jedisTemplate.hdel(key, fieldsNames); + } + + public Long hdel(final String shardingKey, final String key, final String fieldsName) { + JedisTemplate jedisTemplate = getShard(shardingKey); return jedisTemplate.hdel(key, fieldsName); } + public Long hdel(final String shardingKey, final String key, final String[] fieldsNames) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.hdel(key, fieldsNames); + } + public Boolean hexists(final String key, final String fieldName) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.hexists(key, fieldName); } + public Boolean hexists(final String shardingKey, final String key, final String fieldName) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.hexists(key, fieldName); + } + public Set hkeys(final String key) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.hkeys(key); } + public Set hkeys(final String shardingKey, final String key) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.hkeys(key); + } + public Long hlen(final String key) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.hlen(key); } + public Long hlen(final String shardingKey, final String key) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.hlen(key); + } + // / List Actions /// - public Long lpush(final String key, final String... values) { + public Long lpush(final String key, final String value) { JedisTemplate jedisTemplate = getShard(key); + return jedisTemplate.lpush(key, value); + } + + public Long lpush(final String key, final String[] values) { + JedisTemplate jedisTemplate = getShard(key); + return jedisTemplate.lpush(key, values); + } + + public Long lpush(final String shardingKey, final String key, final String value) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.lpush(key, value); + } + + public Long lpush(final String shardingKey, final String key, final String[] values) { + JedisTemplate jedisTemplate = getShard(shardingKey); return jedisTemplate.lpush(key, values); } @@ -256,51 +431,122 @@ public String rpop(final String key) { return jedisTemplate.rpop(key); } + public String rpop(final String shardingKey, final String key) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.rpop(key); + } + public String brpop(final String key) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.brpop(key); } + public String brpop(final String shardingKey, final String key) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.brpop(key); + } + public String brpop(final int timeout, final String key) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.brpop(timeout, key); } + public String brpop(final String shardingKey, final int timeout, final String key) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.brpop(timeout, key); + } + public Long llen(final String key) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.llen(key); } + public Long llen(final String shardingKey, final String key) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.llen(key); + } + public String lindex(final String key, final long index) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.lindex(key, index); } + public String lindex(final String shardingKey, final String key, final long index) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.lindex(key, index); + } + public List lrange(final String key, final int start, final int end) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.lrange(key, start, end); } + public List lrange(final String shardingKey, final String key, final int start, final int end) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.lrange(key, start, end); + } + public void ltrim(final String key, final int start, final int end) { JedisTemplate jedisTemplate = getShard(key); jedisTemplate.ltrim(key, start, end); } + public void ltrim(final String shardingKey, final String key, final int start, final int end) { + JedisTemplate jedisTemplate = getShard(shardingKey); + jedisTemplate.ltrim(key, start, end); + } + public void ltrimFromLeft(final String key, final int size) { JedisTemplate jedisTemplate = getShard(key); jedisTemplate.ltrimFromLeft(key, size); } + public void ltrimFromLeft(final String shardingKey, final String key, final int size) { + JedisTemplate jedisTemplate = getShard(shardingKey); + jedisTemplate.ltrimFromLeft(key, size); + } + public Boolean lremFirst(final String key, final String value) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.lremFirst(key, value); } + public Boolean lremFirst(final String shardingKey, final String key, final String value) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.lremFirst(key, value); + } + public Boolean lremAll(final String key, final String value) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.lremAll(key, value); } + public Boolean lremAll(final String shardingKey, final String key, final String value) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.lremAll(key, value); + } + + // / Set Actions /// + public Boolean sadd(final String key, final String member) { + JedisTemplate jedisTemplate = getShard(key); + return jedisTemplate.sadd(key, member); + } + + public Boolean sadd(final String shardingKey, final String key, final String member) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.sadd(key, member); + } + + public Set smembers(final String key) { + JedisTemplate jedisTemplate = getShard(key); + return jedisTemplate.smembers(key); + } + + public Set smembers(final String shardingKey, final String key) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.smembers(key); + } + // / Sorted Set Actions /// public Boolean zadd(final String key, final double score, final String member) { @@ -308,83 +554,170 @@ public Boolean zadd(final String key, final double score, final String member) { return jedisTemplate.zadd(key, score, member); } + public Boolean zadd(final String shardingKey, final String key, final double score, final String member) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.zadd(key, score, member); + } + public Double zscore(final String key, final String member) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.zscore(key, member); } + public Double zscore(final String shardingKey, final String key, final String member) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.zscore(key, member); + } + public Long zrank(final String key, final String member) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.zrank(key, member); } + public Long zrank(final String shardingKey, final String key, final String member) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.zrank(key, member); + } + public Long zrevrank(final String key, final String member) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.zrevrank(key, member); } + public Long zrevrank(final String shardingKey, final String key, final String member) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.zrevrank(key, member); + } + public Long zcount(final String key, final double start, final double end) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.zcount(key, start, end); } + public Long zcount(final String shardingKey, final String key, final double start, final double end) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.zcount(key, start, end); + } + public Set zrange(final String key, final int start, final int end) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.zrange(key, start, end); } + public Set zrange(final String shardingKey, final String key, final int start, final int end) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.zrange(key, start, end); + } + public Set zrangeWithScores(final String key, final int start, final int end) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.zrangeWithScores(key, start, end); } + public Set zrangeWithScores(final String shardingKey, final String key, final int start, final int end) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.zrangeWithScores(key, start, end); + } + public Set zrevrange(final String key, final int start, final int end) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.zrevrange(key, start, end); } + public Set zrevrange(final String shardingKey, final String key, final int start, final int end) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.zrevrange(key, start, end); + } + public Set zrevrangeWithScores(final String key, final int start, final int end) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.zrevrangeWithScores(key, start, end); } + public Set zrevrangeWithScores(final String shardingKey, final String key, final int start, final int end) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.zrevrangeWithScores(key, start, end); + } + public Set zrangeByScore(final String key, final double min, final double max) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.zrangeByScore(key, min, max); } + public Set zrangeByScore(final String shardingKey, final String key, final double min, final double max) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.zrangeByScore(key, min, max); + } + public Set zrangeByScoreWithScores(final String key, final double min, final double max) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.zrangeByScoreWithScores(key, min, max); } + public Set zrangeByScoreWithScores(final String shardingKey, final String key, final double min, + final double max) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.zrangeByScoreWithScores(key, min, max); + } + public Set zrevrangeByScore(final String key, final double max, final double min) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.zrevrangeByScore(key, max, min); } + public Set zrevrangeByScore(final String shardingKey, final String key, final double max, final double min) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.zrevrangeByScore(key, max, min); + } + public Set zrevrangeByScoreWithScores(final String key, final double max, final double min) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.zrevrangeByScoreWithScores(key, max, min); } + public Set zrevrangeByScoreWithScores(final String shardingKey, final String key, final double max, + final double min) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.zrevrangeByScoreWithScores(key, max, min); + } + public Boolean zrem(final String key, final String member) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.zrem(key, member); } + public Boolean zrem(final String shardingKey, final String key, final String member) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.zrem(key, member); + } + public Long zremByScore(final String key, final double min, final double max) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.zremByScore(key, min, max); } + public Long zremByScore(final String shardingKey, final String key, final double min, final double max) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.zremByScore(key, min, max); + } + public Long zremByRank(final String key, final long start, final long end) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.zremByRank(key, start, end); } + public Long zremByRank(final String shardingKey, final String key, final long start, final long end) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.zremByRank(key, start, end); + } + public Long zcard(final String key) { JedisTemplate jedisTemplate = getShard(key); return jedisTemplate.zcard(key); } + + public Long zcard(final String shardingKey, final String key) { + JedisTemplate jedisTemplate = getShard(shardingKey); + return jedisTemplate.zcard(key); + } } diff --git a/modules/redis/src/main/java/org/springside/modules/nosql/redis/JedisTemplate.java b/modules/redis/src/main/java/org/springside/modules/nosql/redis/JedisTemplate.java index db6193ced..07350d6b4 100644 --- a/modules/redis/src/main/java/org/springside/modules/nosql/redis/JedisTemplate.java +++ b/modules/redis/src/main/java/org/springside/modules/nosql/redis/JedisTemplate.java @@ -257,8 +257,8 @@ public List action(Jedis jedis) { } /** - * Set the string value as value of the key. The string can't be longer than - * 1073741824 bytes (1 GB). + * Set the string value as value of the key. + * The string can't be longer than 1073741824 bytes (1 GB). */ public void set(final String key, final String value) { execute(new JedisActionNoResult() { @@ -412,7 +412,7 @@ public String action(Jedis jedis) { }); } - public List hmget(final String key, final String[] fieldsName) { + public List hmget(final String key, final String... fieldsName) { return execute(new JedisAction>() { @Override public List action(Jedis jedis) { @@ -479,11 +479,11 @@ public Double action(Jedis jedis) { }); } - public Long hdel(final String key, final String... fieldsName) { + public Long hdel(final String key, final String... fieldsNames) { return execute(new JedisAction() { @Override public Long action(Jedis jedis) { - return jedis.hdel(key, fieldsName); + return jedis.hdel(key, fieldsNames); } }); } @@ -661,11 +661,6 @@ public Boolean action(Jedis jedis) { } // / Set Actions /// - /** - * @param key - * @param member - * @return true for add new element, false for only update the score. - */ public Boolean sadd(final String key, final String member) { return execute(new JedisAction() {