add SCAN, HSCAN, SSCAN and ZSCAN

This commit is contained in:
Jonathan Leibiusky
2013-12-03 16:55:52 -05:00
parent efbb710343
commit a27c67de66
14 changed files with 862 additions and 497 deletions

View File

@@ -5,6 +5,7 @@ import redis.clients.util.Hashing;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.regex.Pattern;
@@ -522,5 +523,18 @@ public class ShardedJedis extends BinaryShardedJedis implements JedisCommands {
return j.bitcount(key, start, end);
}
public ScanResult<Entry<String, String>> hscan(String key, int cursor) {
Jedis j = getShard(key);
return j.hscan(key, cursor);
}
public ScanResult<String> sscan(String key, int cursor) {
Jedis j = getShard(key);
return j.sscan(key, cursor);
}
public ScanResult<Tuple> zscan(String key, int cursor) {
Jedis j = getShard(key);
return j.zscan(key, cursor);
}
}